Opened 2 weeks ago

Last modified 12 days ago

#31897 merge_ready defect

util/map_anon_nofork test fails on SunOS

Reported by: svschmel Owned by: teor
Priority: High Milestone: Tor: 0.4.1.x-final
Component: Core Tor/Tor Version: Tor: 0.4.1.1-alpha
Severity: Normal Keywords: tor-test, 042-must, fast-fix, 041-regression, BugSmashFund, 041-backport, consider-backport-after-04233
Cc: svschmel Actual Points: 0.1
Parent ID: Points: 0.1
Reviewer: ahf Sponsor:

Description

I get the following error on SunOS:

uname -a
SunOS oibuild 5.11 illumos-e7a617a7b6 i86pc i386 i86pc

....
FAIL: src/test/test
===================

util/load_win_lib: SKIPPED
util/log_mallinfo: SKIPPED
util/map_anon_nofork: 
  FAIL /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/test/test_util.c:6223: assert(buf[0] OP_EQ 0xd0): -48 vs 208
  [map_anon_nofork FAILED]
1/1360 TESTS FAILED. (2 skipped)
FAIL src/test/test (exit status: 1)
....

Child Tickets

TicketStatusOwnerSummaryComponent
#31948closednickmCID 1454593: passing negative value to memsetCore Tor/Tor

Attachments (1)

test-suite.log (56.6 KB) - added by svschmel 2 weeks ago.

Download all attachments as: .zip

Change History (13)

Changed 2 weeks ago by svschmel

Attachment: test-suite.log added

comment:1 Changed 2 weeks ago by teor

Keywords: 042-must fast-fix 041-regression added
Milestone: Tor: 0.4.2.x-final
Points: 0.1

This looks like a simple signed / unsigned comparison error.

comment:2 Changed 2 weeks ago by nickm

Priority: MediumHigh

comment:3 Changed 2 weeks ago by teor

Owner: set to teor
Status: newassigned
Version: Tor: 0.4.1.6Tor: 0.4.1.1-alpha

comment:4 Changed 2 weeks ago by teor

Actual Points: 0.1
Keywords: BugSmashFund 041-backport consider-backport-after-0433 added
Status: assignedneeds_review

See my PR:

The merge to master was clean, here is the test PR:

comment:5 Changed 2 weeks ago by teor

Keywords: consider-backport-after-04233 added; consider-backport-after-0433 removed

comment:6 Changed 2 weeks ago by asn

Reviewer: ahf

comment:7 Changed 2 weeks ago by svschmel

Hello,

i can commit that this fix works.
Quick and dirty test:

svschmel@oibuild:~/oi-userland/components/network/tor/tor-0.4.1.6/src/test$ wget https://raw.githubusercontent.com/torproject/tor/2420c8c9366e498dfaf3b4b6389ece9dc27ca537/src/test/test_util.c

--2019-10-01 12:29:26-- https://raw.githubusercontent.com/torproject/tor/2420c8c9366e498dfaf3b4b6389ece9dc27ca537/src/test/test_util.c
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.112.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.112.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 202187 (197K) [text/plain]
Saving to: 'test_util.c.1'

test_util.c.1 100%[=================================================================>] 197.45K --.-KB/s in 0.1s

2019-10-01 12:29:26 (1.61 MB/s) - 'test_util.c.1' saved [202187/202187]

...

svschmel@oibuild:~/oi-userland/components/network/tor/tor-0.4.1.6/src/test$ ls -al test_uti*
-rw-r--r-- 1 svschmel staff 202147 Jun 10 14:46 test_util.c
-rw-r--r-- 1 svschmel staff 202187 Oct 1 12:29 test_util.c.1
-rw-r--r-- 1 svschmel staff 11624 Jun 10 14:46 test_util_format.c
-rw-r--r-- 1 svschmel staff 1814 Jun 10 14:46 test_util_process.c

...

svschmel@oibuild:~/oi-userland/components/network/tor/tor-0.4.1.6/src/test$ cp test_util.c.1 test_util.c

...

svschmel@oibuild:~/oi-userland/components/network/tor$ gmake test
(cd /export/home/svschmel/oi-userland/components/network/tor/build/amd64 ; \

/usr/bin/env PATH=/usr/gnu/bin:/usr/bin:/usr/sbin:/usr/perl5/bin \
/usr/gnu/bin/make \

check)

make[1]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'

CC src/test/src_test_test-test_util.o
CCLD src/test/test

/usr/gnu/bin/make check-TESTS check-local
make[2]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
make[3]: Entering directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
PASS: src/test/test
PASS: src/test/test-slow
PASS: src/test/test-memwipe
PASS: src/test/test_workqueue
PASS: src/test/test_keygen.sh
PASS: src/test/test_key_expiration.sh
PASS: src/test/test-timers
SKIP: src/test/fuzz_static_testcases.sh
PASS: src/test/test_zero_length_keys.sh
PASS: src/test/test_workqueue_cancel.sh
PASS: src/test/test_workqueue_efd.sh
PASS: src/test/test_workqueue_efd2.sh
PASS: src/test/test_workqueue_pipe.sh
PASS: src/test/test_workqueue_pipe2.sh
PASS: src/test/test_workqueue_socketpair.sh
SKIP: src/test/test_switch_id.sh
PASS: src/test/test_ntor.sh
SKIP: src/test/test_hs_ntor.sh
PASS: src/test/test_bt.sh
PASS: src/test/test_rebind.sh
============================================================================
Testsuite summary for tor 0.4.1.6
============================================================================
# TOTAL: 20
# PASS: 17
# SKIP: 3
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
============================================================================
make[3]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
perl /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/maint/checkSpace.pl -C \

/export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/lib/*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/core/*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/feature/*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/app/*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/test/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/test/*/*.[ch] /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/src/tools/*.[ch]

python3 /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/maint/checkIncludes.py
if command -v shellcheck; then \

find /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/ -name "*.sh" -exec shellcheck {} +; \
if [ -d "/export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/test" ]; then \

shellcheck /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/test/cov-diff /export/home/svschmel/oi-userland/components/network/tor/tor-0.4.1.6/scripts/test/coverage; \

fi; \

fi
make[2]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
make[1]: Leaving directory '/export/home/svschmel/oi-userland/components/network/tor/build/amd64'
/usr/bin/touch /export/home/svschmel/oi-userland/components/network/tor/build/amd64/.tested

comment:8 Changed 2 weeks ago by ahf

Status: needs_reviewmerge_ready

Patch looks good. And thanks for testing this on a SunOS machine :-)

comment:9 Changed 2 weeks ago by nickm

Keywords: asn-merge added

comment:10 Changed 2 weeks ago by nickm

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

Merged to master, marking for backport.

comment:11 Changed 13 days ago by asn

Keywords: asn-merge removed

comment:12 Changed 12 days ago by teor

I cherry-picked #31948 to the 0.4.1 backport branch, because it is a fix on this change.

Note: See TracTickets for help on using tickets.