Bug 343523 - [PATCH] OS X mach_ports_register: UNKNOWN task message [id 3403, to mach_task_self(), reply 0x30f]
Summary: [PATCH] OS X mach_ports_register: UNKNOWN task message [id 3403, to mach_task...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 14:22 UTC by Rhys Kidd
Modified: 2015-05-12 01:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch. (1.93 KB, patch)
2015-02-21 13:11 UTC, Rhys Kidd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rhys Kidd 2015-01-29 14:22:39 UTC
mach_msg_task() type mach_ports_register, #3403, is not presently supported.

This will lead to errors of the form: "UNKNOWN task message [id 3403, to mach_task_self(), reply 0x30f]"

Reproducible: Always

Steps to Reproduce:
1. Run test suite on OS X 10.10

Actual Results:  
$ perl tests/vg_regtest gdbserver_tests/nlfork_chain memcheck/tests/addressable memcheck/tests/atomic_incs memcheck/tests/noisy_child none/tests/exec-sigmask none/tests/fdleak_ipv4 none/tests/fork none/tests/pth_atfork1 none/tests/shell none/tests/syscall-restart2 none/tests/thread-exits none/tests/threaded-fork
nlfork_chain:    valgrind   --tool=none --vgdb=yes --trace-children=yes --vgdb-prefix=./vgdb-prefix-nlfork_chain ./fork_chain 
addressable:     valgrind   ./addressable 
atomic_incs:     valgrind   -q --track-origins=yes ./atomic_incs 
noisy_child:     valgrind   --child-silent-after-fork=yes ./noisy_child 
exec-sigmask:    valgrind   ./exec-sigmask 
fdleak_ipv4:     valgrind   --track-fds=yes ./fdleak_ipv4 < /dev/null
fork:            valgrind   -q ./fork 
pth_atfork1:     valgrind   ./pth_atfork1 
shell:           valgrind   -q ./shell 
syscall-restart2: valgrind   ./syscall-restart2 
thread-exits:    valgrind   ./thread-exits 
threaded-fork:   valgrind   ./threaded-fork 

== 12 tests, 12 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==

Expected Results:  
$ perl tests/vg_regtest gdbserver_tests/nlfork_chain memcheck/tests/addressable memcheck/tests/atomic_incs memcheck/tests/noisy_child none/tests/exec-sigmask none/tests/fdleak_ipv4 none/tests/fork none/tests/pth_atfork1 none/tests/shell none/tests/syscall-restart2 none/tests/thread-exits none/tests/threaded-fork
nlfork_chain:    valgrind   --tool=none --vgdb=yes --trace-children=yes --vgdb-prefix=./vgdb-prefix-nlfork_chain ./fork_chain 
addressable:     valgrind   ./addressable 
atomic_incs:     valgrind   -q --track-origins=yes ./atomic_incs 
noisy_child:     valgrind   --child-silent-after-fork=yes ./noisy_child 
exec-sigmask:    valgrind   ./exec-sigmask 
fdleak_ipv4:     valgrind   --track-fds=yes ./fdleak_ipv4 < /dev/null
fork:            valgrind   -q ./fork 
pth_atfork1:     valgrind   ./pth_atfork1 
shell:           valgrind   -q ./shell 
syscall-restart2: valgrind   ./syscall-restart2 
thread-exits:    valgrind   ./thread-exits 
threaded-fork:   valgrind   ./threaded-fork 

== 12 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==

See further /usr/include/mach/task.h
Comment 1 Rhys Kidd 2015-02-21 13:11:06 UTC
Created attachment 91200 [details]
Proposed patch.
Comment 2 Rhys Kidd 2015-02-21 13:12:48 UTC
Proposed patch led to desired outcome on the highlighted test cases:

$ perl tests/vg_regtest gdbserver_tests/nlfork_chain memcheck/tests/addressable memcheck/tests/atomic_incs memcheck/tests/noisy_child none/tests/exec-sigmask none/tests/fdleak_ipv4 none/tests/fork none/tests/pth_atfork1 none/tests/shell none/tests/syscall-restart2 none/tests/thread-exits none/tests/threaded-fork
nlfork_chain:    valgrind   --tool=none --vgdb=yes --trace-children=yes --vgdb-prefix=./vgdb-prefix-nlfork_chain ./fork_chain 
addressable:     valgrind   ./addressable 
atomic_incs:     valgrind   -q --track-origins=yes ./atomic_incs 
noisy_child:     valgrind   --child-silent-after-fork=yes ./noisy_child 
exec-sigmask:    valgrind   ./exec-sigmask 
fdleak_ipv4:     valgrind   --track-fds=yes ./fdleak_ipv4 < /dev/null
fork:            valgrind   -q ./fork 
pth_atfork1:     valgrind   ./pth_atfork1 
shell:           valgrind   -q ./shell 
syscall-restart2: valgrind   ./syscall-restart2 
thread-exits:    valgrind   ./thread-exits 
threaded-fork:   valgrind   ./threaded-fork 

== 12 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
Comment 3 Rhys Kidd 2015-02-22 00:43:46 UTC
From my overnight build bot of the full test suite, there are no unexpected regressions due to this patch. Committed in r14952.

(r14951)  == 585 tests, 271 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

(r14952, with patch)  == 585 tests, 258 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==