Opened 5 months ago

Closed 3 months ago

#30234 closed enhancement (fixed)

Get a stacktrace from tor processes launched by stem

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-ci-fail-sometimes, 035-backport, 040-backport
Cc: Actual Points: 0.2
Parent ID: #29437 Points: 0.5
Reviewer: ahf Sponsor: Sponsor31-can

Description

We need to show the stem tor log at the end of the build.
We might also need to propagate the USR1 and abort signals to tor.

Child Tickets

Change History (18)

comment:1 Changed 5 months ago by atagar

Status: newneeds_information

Hi teor. Happy to help but I'm a bit unsure what the ask is from me on this.

comment:2 Changed 5 months ago by teor

Component: Core Tor/StemCore Tor/Tor
Owner: atagar deleted
Status: needs_informationassigned

I think we need to fix this by changing Tor's Travis CI config.

Do stem's tests log all Tor output to a file?

comment:3 Changed 5 months ago by atagar

Do stem's tests log all Tor output to a file?

Do you mean tor's stdout? If so then nope, but we can add that if you'd find it useful. The only logging available via our tests is the '--log [runlevel]' argument which provides stem's logging information. In particular I use '--log trace' when troubleshooting difficult issues.

comment:4 in reply to:  3 Changed 5 months ago by teor

Replying to atagar:

Do stem's tests log all Tor output to a file?

Do you mean tor's stdout? If so then nope, but we can add that if you'd find it useful. The only logging available via our tests is the '--log [runlevel]' argument which provides stem's logging information. In particular I use '--log trace' when troubleshooting difficult issues.

We'll need Tor's logs, so we can see Tor's log messages and stacktraces. I don't mind if they go to a file, or to stdout, or stderr. We just need to be able to get them out of Travis :-)

comment:5 Changed 5 months ago by atagar

Oops! Apologies, I was completely wrong. Stem's tests *do* write tor's logs to a file...

https://gitweb.torproject.org/stem.git/tree/test/runner.py#n72

Stem places the tor log within tor's data directory, which in turn is based on our 'integ.test_directory' configuration which defaults to being within stem's test directory itself.

Would you like for the tor log file path to be better cusomizable? If you'd prefer to have it in another location we can add an option to do so.

comment:6 in reply to:  5 Changed 5 months ago by teor

Replying to atagar:

Oops! Apologies, I was completely wrong. Stem's tests *do* write tor's logs to a file...

https://gitweb.torproject.org/stem.git/tree/test/runner.py#n72

Stem places the tor log within tor's data directory, which in turn is based on our 'integ.test_directory' configuration which defaults to being within stem's test directory itself.

Ok, I found it in stem/test/data/tor_log.

Would you like for the tor log file path to be better cusomizable? If you'd prefer to have it in another location we can add an option to do so.

No, that's fine. We just need to know where it is.

comment:7 Changed 5 months ago by teor

Actual Points: 0.1
Keywords: 035-backport 040-backport added
Milestone: Tor: 0.2.9.x-finalTor: 0.4.1.x-final
Owner: set to teor
Type: defectenhancement
Version: Tor: 0.2.4.8-alpha

comment:8 Changed 5 months ago by teor

Status: assignedneeds_review

See my pull request on 0.3.5:
https://github.com/torproject/tor/pull/971

It merges forward cleanly to master.

See also the build for the branch in my repository:
https://travis-ci.org/teor2345/tor/builds/522878368

We won't know if this change works until we see a stem failure.
(If we don't see one in these builds, I can trigger a failure by setting the time limit very low.)

comment:9 Changed 5 months ago by teor

Reviewer: ahf

Assigning review to ahf, because he's on CI rotation this week.

comment:10 Changed 5 months ago by teor

We do get the tor logs, but we're not propagating the USR1 and ABRT signals from stem to tor:

Apr 22 03:32:30.000 [notice] Monitored process 20402 is dead.
Apr 22 03:32:30.000 [notice] Owning controller process has vanished -- exiting now.
Apr 22 03:32:30.000 [notice] Catching signal TERM, exiting cleanly.

https://travis-ci.org/teor2345/tor/jobs/522893523#L4944

I'll open another child of #29437.

comment:11 Changed 5 months ago by teor

I opened #30257 for the signal propagation.

comment:12 Changed 5 months ago by ahf

Status: needs_reviewmerge_ready

Looks good.

comment:13 Changed 5 months ago by nickm

Milestone: Tor: 0.4.1.x-finalTor: 0.4.0.x-final

Merged to master. Let's see whether this helps before we backport?

comment:14 in reply to:  13 Changed 5 months ago by teor

Replying to nickm:

Merged to master. Let's see whether this helps before we backport?

I believe it helps, I caused a deliberate failure in:
https://travis-ci.org/teor2345/tor/jobs/522893523#L4944

But I think waiting for a backport is a good idea.

comment:15 Changed 4 months ago by teor

Actual Points: 0.10.2

comment:16 Changed 4 months ago by teor

Sponsor: Sponsor31-can

Setting as sponsor 31 can, because we use these jobs to make sure our refactoring works.

comment:17 Changed 4 months ago by nickm

Milestone: Tor: 0.4.0.x-finalTor: 0.3.5.x-final

Backported for 0.4.0. Marking for possible backport to 0.3.5

comment:18 Changed 3 months ago by teor

Resolution: fixed
Status: merge_readyclosed

Backported to 0.3.5.

Note: See TracTickets for help on using tickets.