Opened 15 years ago

Closed 15 years ago

#175 closed defect (fixed)

Kernel hangs in ipc_cleanup()

Reported by: Jakub Jermář Owned by: Jakub Jermář
Priority: major Milestone: 0.4.2
Component: helenos/kernel/generic Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

The hang described in ticket #169 is actually caused by kernel looping on the answerbox spinlock in ipc_cleanup().

The klog read from gdb attached to qemu says:

...A...s...s...e...r...t...i...o...n... ...f...a...i...l...e...d... ...(...n...o...d...e...p...-...>...s...i...z...e... ...%... ...b...p...s... ...=...=... ...0...)... ...a...t... ...f...i...l...e... ...'...f...a...t..._...o...p...s.......c...'...,... ...l...i...n...e... ...1...2...0...7.......
...0...x...3...0...f...4...4...:... ...0...x...1...3...e...1...a...(...)...
...0...x...3...0...f...b...4...:... ...0...x...3...2...9...2...(...)...
...0...x...3...0...f...f...4...:... ...0...x...1...2...f...1...(...)...
...0...x...3...1...0...2...4...:... ...0...x...1...0...d...7...b...(...)...
...0...x...3...1...0...4...4...:... ...0...x...b...5...f...7...(...)...
...c...p...u...0...:... ...l...o...o...p...i...n...g... ...o...n... ...s...p...i...n...l...o...c...k... ...8...0...0...2...d...0...5...8...:...i...p...c..._...b...o...x..._...l...o...c...k...,... ...c...a...l...l...e...r...=...8...0...1...3...1...f...c...1...(...g...e...n...e...r...i...c.../...s...r...c.../...i...p...c.../...i...p...c.......o...:...i...p...c..._...c...l...e...a...n...u...p...)... 

Change History (2)

comment:1 by Jakub Jermář, 15 years ago

The problem seems to be related to homogenous mounts (e.g. FAT on FAT) or possibly other situations when the task sends itself a call. In ipc_cleanup(), it locks TASK→answerbox and
attempts to answer all unanswered calls. For calls that the task sent itself, this will
hang the system, because _ipc_answer_free_call(), which is used during this operation, locks the
callerbox answerbox, which is unfortunately the same as the already locked TASK→answerbox.

comment:2 by Jakub Jermář, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in changeset:head,233.

Note: See TracTickets for help on using tickets.