Project

General

Profile

Actions

Bug #2615

closed

panic while running gdb test suite

Added by phma almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
12/17/2013
Due date:
% Done:

0%

Estimated time:

Description

see https://github.com/DragonFlyBSD/DPorts/wiki/Run-GDB-testsuite

I ran the testsuite on gdb 7.6.1 and it crashed partway through. This is as far as it got:

Running ./gdb.base/fileio.exp ...
FAIL: gdb.base/fileio.exp: Open for write but no write permission returns
EACCES
FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access
returns EACCES
Running ./gdb.base/gcore-relro.exp ...
Running ./gdb.base/huge.exp ...
Running ./gdb.base/find.exp ...
Running ./gdb.base/ctxobj.exp ...
Running ./gdb.base/cond-eval-mode.exp ...
Running ./gdb.base/arrayidx.exp ...
Running ./gdb.base/eval-skip.exp ...
Running ./gdb.base/attach.exp ...

It crashed in the same place both times. The kernel dumps are numbers 2 and 3 in leaf:/home/phma/crash/zyxomma/. I need this fixed so that I can fix the thread bug in gdb.

Actions #1

Updated by nthery almost 11 years ago

Hello,

It tries to ptrace(PT_ATTACH) to process 0 (the swapper) and crashes
during the reparenting because process 0 has no parent. There is
definitely a bug in the kernel which should return an error. This is
maybe also symptomatic of a bug in gdb which shouldn't try to debug
process 0 (or is it a negative test checking how gdb reacts when
failing to attach to a process?)

I'm tempted to make ptrace(PT_ATTACH) return EINVAL for all system
processes to prevent this as a reckon ptrace(2) is intended to debug
userlang only and attaching to kernel processes, besides security
issues, is deadlock-prone. I'm checking the literature and other
implementations to confirm this is the way to go.

Cheers,
Nicolas

On 17 December 2013 23:25, <> wrote:

Issue #2615 has been reported by phma.

----------------------------------------
Bug #2615: panic while running gdb test suite
http://bugs.dragonflybsd.org/issues/2615

I ran the testsuite on gdb 7.6.1 and it crashed partway through. This is as far as it got:

Running ./gdb.base/fileio.exp ...
FAIL: gdb.base/fileio.exp: Open for write but no write permission returns
EACCES
FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access
returns EACCES
Running ./gdb.base/gcore-relro.exp ...
Running ./gdb.base/huge.exp ...
Running ./gdb.base/find.exp ...
Running ./gdb.base/ctxobj.exp ...
Running ./gdb.base/cond-eval-mode.exp ...
Running ./gdb.base/arrayidx.exp ...
Running ./gdb.base/eval-skip.exp ...
Running ./gdb.base/attach.exp ...

It crashed in the same place both times. The kernel dumps are numbers 2 and 3 in leaf:/home/phma/crash/zyxomma/. I need this fixed so that I can fix the thread bug in gdb.

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

Actions #2

Updated by nthery almost 11 years ago

Hello,

Should be fixed on master (763ff625ac).

Cheers,
Nicolas

On 18 December 2013 09:08, Nicolas Thery via Redmine
<> wrote:

Issue #2615 has been updated by nthery.

Hello,

It tries to ptrace(PT_ATTACH) to process 0 (the swapper) and crashes
during the reparenting because process 0 has no parent. There is
definitely a bug in the kernel which should return an error. This is
maybe also symptomatic of a bug in gdb which shouldn't try to debug
process 0 (or is it a negative test checking how gdb reacts when
failing to attach to a process?)

I'm tempted to make ptrace(PT_ATTACH) return EINVAL for all system
processes to prevent this as a reckon ptrace(2) is intended to debug
userlang only and attaching to kernel processes, besides security
issues, is deadlock-prone. I'm checking the literature and other
implementations to confirm this is the way to go.

Cheers,
Nicolas

On 17 December 2013 23:25, <> wrote:

Issue #2615 has been reported by phma.

----------------------------------------
Bug #2615: panic while running gdb test suite
http://bugs.dragonflybsd.org/issues/2615

I ran the testsuite on gdb 7.6.1 and it crashed partway through. This is as far as it got:

Running ./gdb.base/fileio.exp ...
FAIL: gdb.base/fileio.exp: Open for write but no write permission returns
EACCES
FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access
returns EACCES
Running ./gdb.base/gcore-relro.exp ...
Running ./gdb.base/huge.exp ...
Running ./gdb.base/find.exp ...
Running ./gdb.base/ctxobj.exp ...
Running ./gdb.base/cond-eval-mode.exp ...
Running ./gdb.base/arrayidx.exp ...
Running ./gdb.base/eval-skip.exp ...
Running ./gdb.base/attach.exp ...

It crashed in the same place both times. The kernel dumps are numbers 2 and 3 in leaf:/home/phma/crash/zyxomma/. I need this fixed so that I can fix the thread bug in gdb.

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

----------------------------------------
Bug #2615: panic while running gdb test suite
http://bugs.dragonflybsd.org/issues/2615#change-11680

I ran the testsuite on gdb 7.6.1 and it crashed partway through. This is as far as it got:

Running ./gdb.base/fileio.exp ...
FAIL: gdb.base/fileio.exp: Open for write but no write permission returns
EACCES
FAIL: gdb.base/fileio.exp: Unlinking a file in a directory w/o write access
returns EACCES
Running ./gdb.base/gcore-relro.exp ...
Running ./gdb.base/huge.exp ...
Running ./gdb.base/find.exp ...
Running ./gdb.base/ctxobj.exp ...
Running ./gdb.base/cond-eval-mode.exp ...
Running ./gdb.base/arrayidx.exp ...
Running ./gdb.base/eval-skip.exp ...
Running ./gdb.base/attach.exp ...

It crashed in the same place both times. The kernel dumps are numbers 2 and 3 in leaf:/home/phma/crash/zyxomma/. I need this fixed so that I can fix the thread bug in gdb.

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

Actions #3

Updated by phma almost 11 years ago

  • Status changed from New to Resolved

It is fixed. Thanks.

Actions

Also available in: Atom PDF