Skip to contentSkip to conversation

java (and possibly other threaded apps) hanging in rt_sigsuspend

DISCUSSION Frank de Lange 2 participants 2 messages Dec 7, 2000 – Dec 8, 2000

lore
Share & tools
lore
#0 lore raw

Hi Ulrich,

I saw your remarks on the kernel mailing list wrt. 'threaded processes get stuck in rt_sigsuspend/fillonedir/exit_notify' dd. 20000911-12, and thought you might be interested in the fact that something quite like this also happens on 2.4.0-test11 with glibc-2.2 (release), BUT NOT ALWAYS...

I can reliably hang java (Blackdown port jdk1.3, FCS) using the -Xmx parameter (which specifies a maximum heap size), the weird thing is that it does NOT hang which this parameter is either not specified OR specified but larger than a certain value. When it hangs, it always is stuck in a rt_sigsuspend call just after a clone() call. An example:

[frank@behemoth frank]$ java
(java starts and spits out some info, then exits as it should)

[frank@behemoth frank]$ java -Xmx32m

        (java ALWAYS gets stuck:

	pipe([6, 7])                            = 0
	clone()                                 = 14732
	[pid 14679] write(7, "\0\0\0\0\5\0\0\0~\266\2@ $T@\0 T@\0 T@\300\265\2@\0\0\0"..., 148) = 148
	[pid 14679] rt_sigprocmask(SIG_SETMASK, NULL, [RT_0], 8) = 0
	[pid 14679] write(7, "`S\3@\0\0\0\0\20\321\377\277pD\37@\30&\5\10\0\0\0\200\0"..., 148) = 148
	[pid 14679] rt_sigprocmask(SIG_SETMASK, NULL, [RT_0], 8) = 0
	[pid 14679] rt_sigsuspend([]
	)

[frank@behemoth frank]$ java -Xmx64m
(java runs, but it gets stuck if this command is repeated a few times in quick succession.)

[frank@behemoth frank]$ java -Xmx80m
(java runs, no matter how often the command is repeated)

Some data on the test system:

[uname -a]
Linux behemoth.localnet 2.4.0-test11 #1 SMP Wed Nov 22 22:10:52 CET 2000 i686 unknown

[/lib/libc-2.2.so]
GNU C Library stable release version 2.2, by Roland McGrath et al. Copyright (C) 1992,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled by GNU CC version 2.95.2 19991024 (release).
Compiled on a Linux 2.4.0-test11 system on 2000-11-23. Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
The C stubs add-on version 2.1.2.
BIND-8.2.3-T5B
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk Glibc-2.0 compatibility add-on by Cristian Gafton linuxthreads-0.9 by Xavier Leroy
libthread_db work sponsored by Alpha Processor Inc
Report bugs using the `glibcbug' script to <[email protected]>.

[java -version]
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.0-FCS) Java HotSpot(TM) Client VM (build Blackdown-1.3.0-FCS, mixed mode)

Why am I sending you this report? Well, since you indicate that you are working on a rewrite of linuxthreads, this might be of interest. Especially the weird behaviour wrt. the maximum heap size. I do not expect nor ask you to fix the java problems, this is purely informational...

FYI, on a linux 2.2/glibc 2.1.3 box this problem does not occur, in case you wondered...

I cc'd this message to the blackdown team, so they know something's amiss as well.

Cheers//Frank

Signature · 12 lines
  WWWWW      _______________________
 ## o o\    /     Frank de Lange     \
 }#   \|   /                          \
  ##---# _/     <Hacker for Hire>      \
   ####   \      +31-320-252965        /
           \    [email protected]    /
            -------------------------
 [ Hacker: http://www.jargon.org/html/entry/hacker.html ]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Frank" == Frank de Lange <[email protected]> writes:

Frank> I saw your remarks on the kernel mailing list Frank> wrt. 'threaded processes get stuck in
Frank> rt_sigsuspend/fillonedir/exit_notify' dd. 20000911-12, and Frank> thought you might be interested in the fact that something Frank> quite like this also happens on 2.4.0-test11 with glibc-2.2 Frank> (release), BUT NOT ALWAYS...

Frank> I can reliably hang java (Blackdown port jdk1.3, FCS) using Frank> the -Xmx parameter (which specifies a maximum heap size), Frank> the weird thing is that it does NOT hang which this Frank> parameter is either not specified OR specified but larger Frank> than a certain value. When it hangs, it always is stuck in Frank> a rt_sigsuspend call just after a clone() call. An example:

Frank> [frank@behemoth frank]$ java
Frank> (java starts and spits out some info, then exits as
Frank> it should)

Frank> [frank@behemoth frank]$ java -Xmx32m
Frank> (java ALWAYS gets stuck:

Frank> pipe([6, 7]) = 0
Frank> clone() = 14732
Frank> [pid 14679] write(7, "\0\0\0\0\5\0\0\0~\266\2@ $T@\0 T@\0 T@\300\265\2@\0\0\0"..., 148) = 148
Frank> [pid 14679] rt_sigprocmask(SIG_SETMASK, NULL, [RT_0], 8) = 0
Frank> [pid 14679] write(7, "`S\3@\0\0\0\0\20\321\377\277pD\37@\30&\5\10\0\0\0\200\0"..., 148) = 148
Frank> [pid 14679] rt_sigprocmask(SIG_SETMASK, NULL, [RT_0], 8) = 0
Frank> [pid 14679] rt_sigsuspend([]
Frank> )

Can you reproduce this without strace?

I only see this problem when I run with 'strace -f' and java wants to exit (apart from that java works correctly). I don't see the dependency on the heap size here.

Juergen

Signature · 7 lines
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
JVM'01: http://www.usenix.org/events/jvm01/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/