Bug 28175 - Crash in SIGWINCH handler when resizing the terminal window
Summary: Crash in SIGWINCH handler when resizing the terminal window
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-03-18 20:32 UTC by Alex Rønne Petersen
Modified: 2015-03-23 16:11 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
more Stacktrace stuff (99.29 KB, application/octet-stream)
2015-03-20 14:05 UTC, pr0vieh
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alex Rønne Petersen 2015-03-18 20:32:09 UTC
Run this simple program:

```
class Program {
    static void Main () {
        while (true)
            ;
    }
}
```

Then resize the terminal window. You will get:

```
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/mono/bin/mono...done.
(gdb) r
Starting program: /opt/mono/bin/mono test.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeeb36700 (LWP 6686)]
Cannot transition thread 0xb23dd0 from RUNNING with FINISH_ASYNC_SUSPEND

Program received signal SIGABRT, Aborted.
0x00007ffff712c0d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) thread apply all bt full

Thread 2 (Thread 0x7fffeeb36700 (LWP 6686)):
#0  0x00007ffff74c2fd0 in sem_wait () from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#1  0x0000000000782f8c in mono_sem_wait (sem=0xac6da0 <finalizer_sem>, alertable=1) at mono-semaphore.c:101
        res = 32767
#2  0x00000000006c739c in finalizer_thread (unused=0x0) at gc.c:1093
        wait = 1
#3  0x0000000000690b50 in start_wrapper_internal (data=0xb87fc0) at threads.c:664
        info = 0x7fffe80008e0
        start_info = 0xb87fc0
        start_func = 0x6c732b <finalizer_thread>
        start_arg = 0x0
        tid = 140737198122752
        internal = 0x7ffff7f54280
        start_delegate = 0x0
        domain = 0xb24ff0
#4  0x0000000000690c0e in start_wrapper (data=0xb87fc0) at threads.c:711
        dummy = 0
#5  0x000000000078b463 in inner_start_thread (arg=0x7fffffffd020) at mono-threads-posix.c:93
        start_info = 0x0
        t_arg = 0xb87fc0
        res = 0
        start_func = 0x690bea <start_wrapper>
        flags = 4
        result = 0x7fffeeb36700
        handle = 0x408
        info = 0x7fffe80008e0
#6  0x00007ffff74bce9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
No symbol table info available.
#7  0x00007ffff71e98bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#8  0x0000000000000000 in ?? ()
No symbol table info available.

Thread 1 (Thread 0x7ffff7fc7780 (LWP 6683)):
#0  0x00007ffff712c0d5 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x00007ffff712f83b in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x0000000000794327 in monoeg_log_default_handler (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, message=0xb88cf0 "Cannot transition thread 0xb23dd0 from RUNNING with FINISH_ASYNC_SUSPEND", unused_data=0x0) at goutput.c:233
        target = 0x7ffff74af260 <_IO_2_1_stdout_>
#3  0x0000000000794111 in monoeg_g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x85cfa0 "Cannot transition thread %p from %s with FINISH_ASYNC_SUSPEND", args=0x7fffffffc5b8) at goutput.c:113
        msg = 0xb88cf0 "Cannot transition thread 0xb23dd0 from RUNNING with FINISH_ASYNC_SUSPEND"
#4  0x00000000007941ca in monoeg_g_log (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=0x85cfa0 "Cannot transition thread %p from %s with FINISH_ASYNC_SUSPEND") at goutput.c:123
        args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffc690, reg_save_area = 0x7fffffffc5d0}}
#5  0x000000000078b0aa in mono_threads_transition_finish_async_suspend (info=0xb23dd0) at mono-threads-state-machine.c:407
        raw_state = 1
        cur_state = 1
        suspend_count = 0
#6  0x000000000078baca in suspend_signal_handler (_dummy=28, info=0x7fffffffc8f0, context=0x7fffffffc7c0) at mono-threads-posix.c:398
        old_errno = 2
        hp_save_index = -1
        current = 0xb23dd0
        ret = 0
#7  0x000000000078bc93 in abort_signal_handler (_dummy=28, info=0x7fffffffc8f0, context=0x7fffffffc7c0) at mono-threads-posix.c:460
No locals.
#8  <signal handler called>
No symbol table info available.
#9  0x0000000040012cc4 in ?? ()
No symbol table info available.
#10 0x00007fffffffcdd0 in ?? ()
No symbol table info available.
#11 0x0000000040012d8f in ?? ()
No symbol table info available.
#12 0x0000000000000000 in ?? ()
No symbol table info available.
```


I don't know if this is Linux-specific.
Comment 1 pr0vieh 2015-03-20 14:05:27 UTC
Created attachment 10431 [details]
more Stacktrace stuff

Confirmed !
i have added another stacktrace...
Comment 2 Rodrigo Kumpera 2015-03-23 16:11:20 UTC
Fixed in master.