Spontaneous reboot involving 6-stable, gdb, and -pthread

Jeremy Nelson jnelson at epicsol.org
Thu Jun 8 01:04:16 UTC 2006

I am trying to collect enough information to file a bug report about a 
problem I am running into.  

I have two separate machines:
	Machine 1 is running 6.1-RC/amd64
	Machine 2 first was running 5.4-RELEASE/amd64
	Machine 2 then it ran 5-STABLE/amd64
	Machine 2 now it runs 6-STABLE/amd64 from monday.

If I build ftp://ftp.epicsol.org/pub/epic/EPIC5/epic5-0.2.0.tar.gz,
(the update for the irc/epic5 port hasn't been comitted yet) and manually
add -pthread to LDFLAGS, and run the binary under /usr/bin/gdb, the machine 
spontaneously reboots.  It doesn't appear to be a panic, because I've 
compiled a debugging kernel with DDB and KDB, etc, and it does not trap 
to the kernel debugger, just a reboot, as though I had hit the reset switch.

I've successfully reproduced this 100% of the time I've tried it on multiple
machines, on multiple branches of freebsd.  I have not (yet) been able to
test it on i386, so I don't (yet) know if it's amd64-related.

The last thing I see before the reboot is:
	[New Thread 0x<address> (LWP <number>)]

I've found I can avoid the panic by doing any one of:
	1) Don't run under /usr/bin/gdb
	2) Use /usr/ports/devel/gdb6 instead of /usr/bin/gdb
	3) Remove the need to have -pthread in LDFLAGS

I don't have an /etc/libmap.conf on either machine.

Before I file a bug report, are there any other hints anyone can give me
for what I might be running across here?

(I am trying to fix this, because linking against ruby1.8 requires -pthread,
 so this is something new that I'm getting bug reports for.)

Jeremy Nelson

More information about the freebsd-questions mailing list