[Ur] Segfault on initialization

Daniel Patterson dbp at dbpmail.net
Fri Jun 14 16:54:44 EDT 2013


Hi,

I just added some new code and the produced binary is segfaulting! It
happens when it is starting up. Here is the backtrace:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Database connection initialized.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt

#0  0x0000000000000000 in ?? ()
#1  0x00007ffff79cfe33 in uw_Basis_get_cookie (ctx=0x619060,
c=0x407735 "Userpass/c") at urweb.c:3064
#2  0x0000000000402d22 in uw_cookie_sig ()
#3  0x0000000000403607 in uw_initializer ()
#4  0x00007ffff79d0e08 in uw_initialize (ctx=0xffffffffffffff08,
ctx at entry=0x619060) at urweb.c:3403
#5  0x00007ffff79d2deb in uw_request_init (app=0x60b5c0,
logger_data=logger_data at entry=0x0,
log_error=log_error at entry=0x7ffff7bdc290 <log_error>,
    log_debug=log_debug at entry=0x7ffff7bdc1f0 <log_debug>) at request.c:183
#6  0x00007ffff7bdb92b in main (argc=1, argv=0x7fffffffe288) at http.c:293
#7  0x00007ffff669fead in __libc_start_main () from
/lib/x86_64-linux-gnu/libc.so.6
#8  0x0000000000402b65 in _start ()

The application in its current state is here:

http://hub.darcs.net/dbp/latinamerica/browse/backend

With this being the most recent patch (so if changes happen in the
future that make this segfault not happen, it can be reproduced):
http://hub.darcs.net/dbp/latinamerica/patch/20130614204237-a4b25

I'm not sure how to try minimizing it, because the place where it
looks like it is triggering (initializing a cookie) is not something
I've changed recently (and I've never gotten a segfault before).

I've tested with the most recent released version, 20130421, and also
the current public mercurial version.

There is C code in the project, but nothing that I've changed
recently, and nothing that should have been exercised differently with
the most recent changes (plus it is all pretty straightforward code).

Any thoughts?



More information about the Ur mailing list