Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#802 closed defect (fixed)

test-srv_volsrv: volume/same_twice test hits an assertion

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

Description

When running the *same_twice* test from the *volume* suite from test-
srv_volsrc, the test hits an assertion:

[/test/test-srv_volsrv(74)] Assertion failed (old >= 0) in task 74, file "../helenos.git/uspace/lib/c/include/refcount.h", line 74.
[/test/test-srv_volsrv(74)] 0x0000000070141b60: 0x0000000070189d83()
[/test/test-srv_volsrv(74)] 0x0000000070141b90: 0x000000007018a40a()
[/test/test-srv_volsrv(74)] 0x0000000070141be0: 0x0000000000401b59()
[/test/test-srv_volsrv(74)] 0x0000000070141d00: 0x0000000000401edc()
[/test/test-srv_volsrv(74)] 0x0000000070141d30: 0x0000000000404b3e()
[/test/test-srv_volsrv(74)] 0x0000000070141d40: 0x0000000000404cd7()
[/test/test-srv_volsrv(74)] 0x0000000070141db0: 0x00000000004040ab()
[/test/test-srv_volsrv(74)] 0x0000000070141df0: 0x000000007015725b()
[/test/test-srv_volsrv(74)] 0x0000000070141e10: 0x00000000004026e3()
[/test/test-srv_volsrv(74)] 0x0000000070141e20: 0x000000000040264c()
[/test/test-srv_volsrv(74)] -- end of stack trace --
[/srv/taskmon(16)] taskmon: Task 74 fault in thread 0xffffffff819bc7a0.
[/srv/taskmon(16)] taskmon: Executing /app/taskdump -t 74
[/app/taskdump(75)] Task Dump Utility
[/app/taskdump(75)] Dumping task '/test/test-srv_volsrv' (task ID 74).
[/app/taskdump(75)] Loaded symbol table from /test/test-srv_volsrv
[/app/taskdump(75)] Threads:
[/app/taskdump(75)]  [1] hash: 0xffffffff819bc7a0
[/app/taskdump(75)] Thread 0xffffffff819bc7a0: PC = 0x000000007016bf6d (_end+1876288229). FP = 0x00000000701419e0
[/app/taskdump(75)]   0x00000000701419e0: 0x000000007016bf6d (_end+1876288229)
[/app/taskdump(75)]   0x0000000070141ac0: 0x000000007016c02b (_end+1876288419)
[/app/taskdump(75)]   0x0000000070141af8: 0x0000000000000026 (longjmp+38)
[/app/taskdump(75)] Address space areas:
[/app/taskdump(75)]  [1] flags: R-XC base: 0x0000000000400000 size: 28672
[/app/taskdump(75)]  [2] flags: RW-C base: 0x0000000000407000 size: 28672
[/app/taskdump(75)]  [3] flags: RW-C base: 0x000000000040e000 size: 4096
[/app/taskdump(75)]  [4] flags: RW-C base: 0x0000000000410000 size: 4096
[/app/taskdump(75)]  [5] flags: RW-C base: 0x0000000000412000 size: 4096
[/app/taskdump(75)]  [6] flags: RW-C base: 0x0000000000414000 size: 4096
[/app/taskdump(75)]  [7] flags: R--C base: 0x0000000000416000 size: 4096
[/app/taskdump(75)]  [8] flags: RW-C base: 0x0000000000417000 size: 20480
[/app/taskdump(75)]  [9] flags: R-XC base: 0x0000000070000000 size: 94208
[/app/taskdump(75)]  [10] flags: RW-C base: 0x0000000070017000 size: 126976
[/app/taskdump(75)]  [11] flags: RW-C base: 0x0000000070036000 size: 4096
[/app/taskdump(75)]  [12] flags: RW-C base: 0x0000000070037000 size: 4096
[/app/taskdump(75)]  [13] flags: RW-C base: 0x0000000070039000 size: 4096
[/app/taskdump(75)]  [14] flags: RW-C base: 0x000000007003b000 size: 4096
[/app/taskdump(75)]  [15] flags: RW-C base: 0x000000007003d000 size: 4096
[/app/taskdump(75)]  [16] flags: R--C base: 0x000000007003f000 size: 4096
[/app/taskdump(75)]  [17] flags: RW-C base: 0x0000000070040000 size: 4096
[/app/taskdump(75)]  [18] flags: RW-C base: 0x0000000070042000 size: 1048576
[/app/taskdump(75)]  [19] flags: R-XC base: 0x0000000070143000 size: 385024
[/app/taskdump(75)]  [20] flags: RW-C base: 0x00000000701a1000 size: 131072
[/app/taskdump(75)]  [21] flags: RW-C base: 0x00007ffffff00000 size: 1048576
[/app/taskdump(75)] Failed dumping fibrils.

Change History (3)

comment:1 by Jiri Svoboda, 5 years ago

In the same_twice test we lookup-ref a volume, then delete the reference, then look up the volume again. The reference count drops to zero, but the volume is retained despite reference count, because it has persistent configuration associated with it. When the volume is looked up again, the reference count increases from zero to one. This trips up a sanity check in refcount_up.

comment:2 by Jiri Svoboda, 5 years ago

Milestone: 0.9.2
Resolution: fixed
Status: newclosed

Solved in revision 0a201454d136e12704a02743625fcf6428e1268a. Added one extra reference for volumes with persistent configuration.

comment:3 by Jakub Jermář, 3 years ago

Milestone: 0.9.20.11.1

Milestone renamed

Note: See TracTickets for help on using tickets.