Opened 4 months ago

Last modified 2 weeks ago

#30916 merge_ready defect

assert in dimap_add_entry()

Reported by: dgoulet Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor: 0.2.4.8-alpha
Severity: Normal Keywords: crash, 042-should consider-backport-after-0423 035-backport 040-backport 041-backport BugSmashFund
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: teor Sponsor:

Description

From tor-relays@:

https://lists.torproject.org/pipermail/tor-relays/2019-June/017402.html

The stack trace is:

Jun 18 13:33:31.000 [notice] Bootstrapped 0%: Starting
Jun 18 13:33:32.000 [notice] Starting with guard context "default"

============================================================ T= 1560854012
INTERNAL ERROR: Raw assertion failed at ../src/lib/ctime/di_ops.c:179: ! 
old_val/usr/bin/tor(dump_stack_symbols_to_error_fds+0x33)[0x55a17b410943]
/usr/bin/tor(tor_raw_assertion_failed_msg_+0x86)[0x55a17b410fd6]
/usr/bin/tor(dimap_add_entry+0xa0)[0x55a17b411ba0]
/usr/bin/tor(construct_ntor_key_map+0x69)[0x55a17b357969]
/usr/bin/tor(server_onion_keys_new+0x4d)[0x55a17b39f4dd]
/usr/bin/tor(+0x66e27)[0x55a17b287e27]
/usr/bin/tor(threadpool_new+0x18b)[0x55a17b3b3f0b]
/usr/bin/tor(cpu_init+0x9d)[0x55a17b28828d]
/usr/bin/tor(run_tor_main_loop+0x136)[0x55a17b27a496]
/usr/bin/tor(tor_run_main+0x1215)[0x55a17b27b935]
/usr/bin/tor(tor_main+0x3a)[0x55a17b278a8a]
/usr/bin/tor(main+0x19)[0x55a17b278609]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7ffb901ba2e1]
/usr/bin/tor(_start+0x2a)[0x55a17b27865a]
Jun 18 13:33:33.000 [notice] Tor 0.3.5.8 opening log file.

It appears that tor tried to add the same value in the di_digest256_map_t twice.

Logs indicate 0.3.5.8

Child Tickets

Change History (10)

comment:1 Changed 4 months ago by nickm

I think this is probably caused by having an ntor key stored as the "old ntor key" before it is removed as the "current ntor key". For a workaround, removing secret_onion_key_ntor.old should be sufficient.

comment:2 Changed 5 weeks ago by nickm

Keywords: 042-should added

comment:3 Changed 4 weeks ago by nickm

Owner: set to nickm
Status: newaccepted

comment:4 Changed 4 weeks ago by nickm

Actual Points: .1
Keywords: 035-backport 040-backport 041-backport BugSmashFund added

See branch bug30915_035 with PR at https://github.com/torproject/tor/pull/1340 .

It merges cleanly to 0.4.0, but hits a conflict for 0.4.1. See branch bug30915_041 with PR at https://github.com/torproject/tor/pull/1341 .

I'll put this in needs_review once CI is passing.

comment:5 Changed 4 weeks ago by nickm

Status: acceptedneeds_review

comment:6 Changed 3 weeks ago by asn

Reviewer: teor

comment:7 Changed 3 weeks ago by teor

Keywords: consider-backport-after-0433 added
Status: needs_reviewmerge_ready
Version: Tor: 0.3.5.8Tor: 0.2.4.8-alpha

Looks good to me, pretty simple change.

comment:8 Changed 3 weeks ago by nickm

Keywords: asn-merge added

comment:9 Changed 3 weeks ago by asn

Keywords: asn-merge removed
Milestone: Tor: 0.4.2.x-finalTor: 0.4.1.x-final

Merged. Leaving open for backports.

comment:10 Changed 2 weeks ago by teor

Keywords: consider-backport-after-0423 added; consider-backport-after-0433 removed
Note: See TracTickets for help on using tickets.