Opened 11 months ago

Last modified 5 weeks ago

#27331 new defect

Non-fatal assertion ent->cdm_diff_status != CDM_DIFF_PRESENT failed in cdm_diff_ht_check_and_note_pending at src/or/consdiffmgr.c:272

Reported by: a_p Owned by:
Priority: High Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor: 0.3.4.7-rc
Severity: Normal Keywords: regression, 035-must, 035-backport, 040-backport, 041-should
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

tor in relay mode
os: FreeBSD 11.2

Bug: Non-fatal assertion ent->cdm_diff_status != CDM_DIFF_PRESENT failed in cdm_diff_ht_check_and_note_pending at src/or/consdiffmgr.c:272. Stack trace: (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x11ae5f8 <log_backtrace+0x48> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x11c914a <tor_bug_occurred_+0x10a> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x114d019 <consdiffmgr_rescan+0x8a9> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x801b4eda0 <event_base_assert_ok_nolock_+0x9d0> at /usr/local/lib/libevent-2.1.so.6 (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x801b4af4e <event_base_loop+0x50e> at /usr/local/lib/libevent-2.1.so.6 (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x1079ed4 <do_main_loop+0x5f4> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x107ba7d <tor_run_main+0xbd> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x1076d5c <tor_main+0x4c> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x1076bf9 <main+0x19> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)
 Bug:     0x1076af0 <_start+0x180> at /usr/local/bin/tor (on Tor 0.3.4.7-rc 8465a8d84647c349)

Child Tickets

Change History (13)

comment:1 Changed 11 months ago by teor

Keywords: regression 034-must added
Milestone: Tor: 0.3.4.x-final
Version: 0.3.4.7-rc

This is probably due to our event-loop related changes in 0.3.4.

comment:2 Changed 10 months ago by teor

Keywords: 035-must added; 034-must removed
Milestone: Tor: 0.3.4.x-finalTor: 0.3.5.x-final

034 is stable, so it's too late for 034-must

comment:3 Changed 10 months ago by nickm

Keywords: 035-must removed

We should fix this if we can, but it cannot be "035-must" since we already shipped a stable release with the same problem.

comment:4 Changed 10 months ago by nickm

Priority: MediumHigh

comment:5 Changed 9 months ago by nickm

note: ahf and I are going to try to figure this out....

comment:6 Changed 9 months ago by nickm

So, this means that in consdiffmgr_rescan(), we somehow added a value to compute_diffs_from, but later on we found a corresponding entry in cdm_diff_ht that indicated that we already had a value here.

It might be the case that the old value had the same target_sha3 (in which case we already did compute a value here!) or that the old value had a different target_sha3 (in which case it should have been removed by cdm_diff_ht_purge().

Since we've only had one report here, this probably isn't super-frequent. Maybe we should log more about this case if it occurs, so we can see where the error is happening.

comment:7 Changed 8 months ago by nickm

Keywords: 035-must added

comment:8 Changed 7 months ago by nickm

Closed #26395 and #28787 as duplicates of this.

comment:9 Changed 6 months ago by dgoulet

Just hit this on a relay Tor 0.4.0.1-alpha 16430fdaf546cf8a: roughly 20hours after startup:

Jan 17 13:06:59.525 [warn] tor_bug_occurred_(): Bug: src/feature/dircache/consdiffmgr.c:279: cdm_diff_ht_check_and_note_pending: Non-fatal assertion ent->cdm_diff_status != CDM_DIFF_PRESENT failed. (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug: Non-fatal assertion ent->cdm_diff_status != CDM_DIFF_PRESENT failed in cdm_diff_ht_check_and_note_pending at src/feature/dircache/consdiffmgr.c:279. Stack trace: (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(log_backtrace_impl+0x45) [0x562981786635] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(tor_bug_occurred_+0xc0) [0x562981781c90] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(+0xe3bc2) [0x562981671bc2] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.1.so.6(+0x1ea11) [0x7f6e8bf98a11] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.1.so.6(event_base_loop+0x53f) [0x7f6e8bf9933f] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(do_main_loop+0x94) [0x5629815fcb14] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(tor_run_main+0x122d) [0x5629815e9f1d] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(tor_main+0x3a) [0x5629815e70ea] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(main+0x19) [0x5629815e6c79] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f6e8b2a9b97] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)
Jan 17 13:06:59.586 [warn] Bug:     /root/git/tor/src/app/tor(_start+0x2a) [0x5629815e6cca] (on Tor 0.4.0.1-alpha 16430fdaf546cf8a)

comment:10 Changed 4 months ago by teor

Keywords: 034-backport 035-backport 040-backport added
Milestone: Tor: 0.3.5.x-finalTor: 0.4.0.x-final

comment:11 Changed 2 months ago by nickm

Keywords: 041-should added
Milestone: Tor: 0.4.0.x-finalTor: 0.4.1.x-final

comment:12 Changed 2 months ago by nickm

Keywords: regression 035-must 034-backport 035-backport 040-backport 041-shouldregression, 035-must, 034-backport, 035-backport, 040-backport, 041-should

comment:13 Changed 5 weeks ago by nickm

Keywords: 034-backport removed

Removing 034-backport from all open tickets: 034 has reached EOL.

Note: See TracTickets for help on using tickets.