I've switched to 4.0.5, and the hangs are less frequent (though they still
happen). Now, though, we're getting this shutdown crash. Is it possibly fixed
by a later patch?
Full stack attached. Short version:
sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
85movq %rax, %rcx
Id Target Id Frame
14 Thread 0x7f7d3726b700 (LWP 19847) "Finalizer" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
13 Thread 0x7f7d279cc700 (LWP 19882) "Threadpool moni" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
12 Thread 0x7f7d2757d700 (LWP 19890) "IO Threadpool w" 0x7f7d3de26cd9 in
__libc_waitpid (pid=pid@entry=24339, stat_loc=stat_loc@entry=0x7f7d2753c19c,
options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
11 Thread 0x7f7d268ff700 (LWP 19903) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
10 Thread 0x7f7d25dfe700 (LWP 19916) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
9Thread 0x7f7d26d7a700 (LWP 19920) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
8Thread 0x7f7cf79e3700 (LWP 19940) "hydrogen_main" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
7Thread 0x7f7cf77e2700 (LWP 19941) "Timer-Scheduler" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
6Thread 0x7f7cf6dff700 (LWP 19951) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
5Thread 0x7f7cf5bfd700 (LWP 19967) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
4Thread 0x7f7cf59fc700 (LWP 19971) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
3Thread 0x7f7cf57fb700 (LWP 19978) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
2Thread 0x7f7cf55fa700 (LWP 19980) "Threadpool work" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 1Thread 0x7f7d3e955780 (LWP 19843) "LobbyServer" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
...
Thread 1 (Thread 0x7f7d3e955780 (LWP 19843)):
#0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
#1 0x0061def7 in mono_sem_wait (sem=sem@entry=0x7f7d04000970,
alertable=alertable@entry=0) at mono-semaphore.c:101
#2 0x006230ca in mono_threads_core_suspend
(info=info@entry=0x7f7d040008e0, interrupt_kernel=interrupt_kernel@entry=1) at
mono-threads-posix.c:418
#3 0x00622513 in mono_thread_info_suspend_sync (error_condition=,
interrupt_kernel=1, tid=140175507707648) at mono-threads.c:474
#4 mono_thread_info_safe_suspend_sync (id=140175507707648,
interrupt_kernel=interrupt_kernel@entry=1) at mono-threads.c:652
#5 0x00589705 in suspend_thread_internal (thread=0x7f7d37312940,
interrupt=1) at threads.c:4707
#6 0x00589bdd in mono_thread_suspend_all_other_threads () at
threads.c:3142
#7 0x0053c0f6 in ves_icall_System_Environment_Exit (result=0) at
icall.c:6471
-Original Message-
From: David Evans [mailto:dev...@pacificbiosciences.com]
Sent: Monday, June 13, 2016 12:40 PM
To: Chris Swiedler ; mono-devel-list
Subject: RE: Shutdown hangs
I saw something similar when I was testing 4.2.2 awhile back, a rare hang on
Exit with the main thread waiting like yours. I haven't tried 4.2.3 to see if
our hang reproduces yet. We're still on 4.0.4 and we don't see it there.
In the hang we saw, I also had one thread in pthread_cond_wait like yours,
though we had two threads also in poll() with
libusb_handle_events_timeout_completed () further up the stack.
(gdb) info threads
Id Target Id Frame
16 Thread 0x7f5eb0bff700 (LWP 2763) "mono" pthread_cond_wait@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
15 Thread 0x7f5eae7e1700 (LWP 2765) "Finalizer" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
14 Thread 0x7f5ead26b700 (LWP 2784) "Timer-Scheduler" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
13 Thread 0x7f5eacf2f700 (LWP 2806) "Top" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
12 Thread 0x7f5eacd2a700 (LWP 2807) "Top" 0x7f5eb1b48b9d in nanosleep
() at ../sysdeps/unix/syscall-template.S:81
11 Thread 0x7f5e8e07b700 (LWP 2840) "Top" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
* 10 Thread 0x7f5e72fa5700 (LWP 2980) "Top" 0x7f5eb186112d in poll () at
../sysdeps/unix/syscall-template.S:81
9Thread 0x7f5e727a4700 (LWP 2981) "Top" 0x7f5eb186112d in poll () at
../sysdeps/unix/syscall-template.S:81
8Thread 0x7f5e71a7b700 (LWP 3531) "Top" sem_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85
7Thread 0x7f5e7187a700 (LWP 3532)