Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#3340 closed bug (fixed)

[bin:gdb] don't close on terminal close

Reported by: diver Owned by: bonefish
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Start Haiku hrev28976 Type in Terminal AboutSystem, it will crash so click Debug Type "bt" in gdb shell Close Terminal gdb session Note that a) AboutSystem is still in the Deskbar and b) You can't kill it in the first Terminal with Ctrl+c

Attachments (6)

segment_aa (480.0 KB) - added by diver 9 years ago.
segment_ab (480.0 KB) - added by diver 9 years ago.
segment_ac (480.0 KB) - added by diver 9 years ago.
segment_ad (480.0 KB) - added by diver 9 years ago.
segment_ae (286.5 KB) - added by diver 9 years ago.
terminal.png (162.7 KB) - added by diver 9 years ago.

Change History (20)

comment:1 Changed 10 years ago by diver

Forgot about formatting... Doh!

comment:2 Changed 10 years ago by bonefish

Blocking: 3492 added

(In #3492) Indeed a dup of #3340.

comment:2 Changed 10 years ago by bonefish

Blocking: 3492 removed
Owner: changed from axeld to bonefish

Likely a kernel or TTY problem. I believe I've also seen programs started in the terminal continue running after the Terminal was closed, which is probably the same issue. Assigning to myself for the time being.

Changed 9 years ago by diver

Attachment: segment_aa added

Changed 9 years ago by diver

Attachment: segment_ab added

Changed 9 years ago by diver

Attachment: segment_ac added

Changed 9 years ago by diver

Attachment: segment_ad added

Changed 9 years ago by diver

Attachment: segment_ae added

comment:3 Changed 9 years ago by diver

These files were split due to Trac's 488 KB size limit (pretty low I'd day) using this command:

split -b 480k AboutSystem.r28911.zip segment_

To merge them back use:

cat segment* > AboutSystem.r28911.zip

comment:4 Changed 9 years ago by bonefish

What could one extend find when reconstructing and unzipping the archive?

Generally I would say that's the same problem as #5395. I'll look into that one soon.

comment:5 Changed 9 years ago by bonefish

Version: R1/pre-alpha1R1/Development

comment:6 Changed 9 years ago by diver

There are AboutSystem from hrev28911 and libraries using which one can reproduce the problem from the description.

Archive:  /boot/home/Desktop/AboutSystem.r28911.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  02-22-10 03:15   AboutSystem.r28911/
   111132  01-16-09 01:37   AboutSystem.r28911/AboutSystem
        0  02-22-10 03:16   AboutSystem.r28911/lib/
  2902659  01-16-09 01:37   AboutSystem.r28911/lib/libbe.so
  1043075  01-16-09 01:37   AboutSystem.r28911/lib/libiconv.so
   948867  01-16-09 01:37   AboutSystem.r28911/lib/libroot.so
   309891  01-16-09 01:37   AboutSystem.r28911/lib/libstdc++.r4.so
    27267  01-16-09 01:37   AboutSystem.r28911/lib/libtextencoding.so
   121475  01-16-09 01:37   AboutSystem.r28911/lib/libtranslation.so
 --------                   -------
  5464366                   9 files

comment:7 Changed 9 years ago by bonefish

Status: newin-progress

I can reproduce the issue with the attached AboutSystem, though not with "bt", but with "help files". Will look into it tomorrow.

comment:8 Changed 9 years ago by bonefish

Resolution: fixed
Status: in-progressclosed

Fixed in hrev35584.

comment:9 Changed 9 years ago by diver

I could still reproduce it with hrev35586!

comment:10 in reply to:  9 Changed 9 years ago by bonefish

Replying to diver:

I could still reproduce it with hrev35586!

Then please provide a new test case. The attached one works fine for me now. Besides, the fixed issue pretty nicely explained the incorrect behavior.

Changed 9 years ago by diver

Attachment: terminal.png added

comment:11 Changed 9 years ago by diver

I dropped AboutSystem onto already opened Terminal and pressed enter.
Clicked Debug button when AboutSystem crashed and went back to the first Terminal where I tried to use Ctrl+C.

comment:12 in reply to:  11 Changed 9 years ago by bonefish

Replying to diver:

I dropped AboutSystem onto already opened Terminal and pressed enter.
Clicked Debug button when AboutSystem crashed and went back to the first Terminal where I tried to use Ctrl+C.

OK, that's not a bug at all, though. Ctrl-C generates the signal SIGINT. SIGINT is not universally deadly. Programs can block or handle it (e.g. try it in vim). Besides that, as long as a program is stopped in the debugger non-deadly signals won't be delivered at all, and furthermore the debugger can decide to intercept them anyway. The only way to kill a debugged program from without the debugger is to actually kill it, e.g. via ProcessController or "kill -9 ...".

comment:13 Changed 9 years ago by diver

Ahh, ok, thanks for explanation!

Note: See TracTickets for help on using tickets.