cvs commit: src/lib/libkse/thread thr_kern.c

Daniel Eischen deischen at freebsd.org
Fri Nov 30 14:40:43 PST 2007


On Fri, 30 Nov 2007, Arno J. Klaassen wrote:

>
> Hello,
>
> Daniel Eischen <deischen at freebsd.org> writes:
>
>> deischen    2007-11-30 17:16:14 UTC
>>
>>   FreeBSD src repository
>>
>>   Modified files:
>>     lib/libkse/thread    thr_kern.c
>>   Log:
>>   Initialize the current thread and signal locks so that sigaction()
>>   will work after a fork().
>
>
> I spotted this patch wrt my .exec() problems.
>
> Quick recall : I get strange exceptions in java-code doing quite
> a lot of .exec() calls, but only on 2x2way SMP, not on UP or
> single CPU SMP.
>
> I get these problems under releng_6 as well, but 'my' only
> 2x2way SMP box is a production server I cannot test on.
>
> Seeing this patch, I retested on a 2x2 SMP box running releng_7(amd64)
> libmapping libthr.so.3 to libkse.so.3 for /usr/local/jdk1.5.0/bin/java_g.
>
> I use the attached test-program (adapted after gentile remarks of Nate
> Williams; I hope there's not yet another program error in it but it
> does run flawlessly with libthr).
>
> Running it like "/usr/local/jdk1.5.0/bin/java_g Test_cmd /tmp 0 "
> it will produce a java_g.core after a number of iterations
> with exit status 139.
>
> Both with and without the above patch applied (to releng_7) the
> gdb trace shows (I recompiled libkse with -g as well, but no
> line-numbers showing up ) :
>
> gdb -core java_g.core /usr/local/jdk1.5.0/bin/java_g
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "amd64-marcel-freebsd"...
> Core was generated by `java_g'.

[ ... ]

> (gdb) where
> #0  0x000000080075d151 in pthread_sigmask () from /usr/lib/libkse.so.3
> #1  0x000000080075d103 in sigprocmask () from /usr/lib/libkse.so.3
> #2  0x000000080076c423 in pthread_kill () from /usr/lib/libkse.so.3
> #3  0x0000000800758f29 in fork () from /usr/lib/libkse.so.3
> #4  0x0000000801e43158 in jdk_fork_wrapper ()

This isn't really telling me anything because fork() doesn't call
pthread_kill(), and pthread_kill() doesn't call sigprocmask().

-- 
DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_cmd.java
Type: application/octet-stream
Size: 8318 bytes
Desc: 
Url : http://lists.freebsd.org/pipermail/freebsd-java/attachments/20071130/4acd10e4/Test_cmd.obj


More information about the freebsd-java mailing list