Opened 9 years ago

Closed 9 years ago

#5296 closed bug (fixed)

KDL in team_get_controlling_tty()

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

Description

I just got a NULL pointer access in team_get_controlling_tty(). Unfortunately, I didn't have any time to look into it, ie. I don't know if the team's group or the group's session pointer was NULL.

In any case, the bug appeared at the end of a gdb session.

Ingo, maybe you remember a bit how your session/group implementation is supposed to work? I've assigned you the bug for now.

Attachments (1)

team_group.cpp (304 bytes) - added by axeld 9 years ago.
test program

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by axeld

Attachment: team_group.cpp added

test program

comment:1 Changed 9 years ago by axeld

Just ran into it again. This time I had the pleasure being able to look into it ;-)

Anyway, the team's group member is already NULL. What happens is that the team is already destructed while its threads aren't yet.

I've attached a short test program that one can use to reproduce the issue 100%: when run it launches another thread and waits for user input. Then you have to attach GDB to that second thread, and quit GDB. Say welcome to KDL.

comment:2 Changed 9 years ago by anevilyak

This isn't possibly related to the recent thread_do_exit_work() changes is it?

comment:3 Changed 9 years ago by axeld

Even if it is, that wouldn't matter, as this is definitely a kernel bug that deserves to be fixed.

comment:4 Changed 9 years ago by bonefish

Status: newin-progress

Will rework the team shutdown a bit.

comment:5 Changed 9 years ago by bonefish

Resolution: fixed
Status: in-progressclosed

Fixed in hrev35196.

Note: See TracTickets for help on using tickets.