On Sat, Oct 26, 2019 at 04:44:41PM -0000, Olaf Seibert wrote:
> Public bug reported:
>
> I am preparing a package of breezy 3.0.1 on NetBSD's pkgsrc. I am using
> NetBSD/amd64 8.1 and Python 3.7.4.
>
> Several of the tests fail with the same or very similar stack traces:
>
> ```
> ...ary.test_symlink_content_summary(WorkingTreeFormat6,remote)ERROR 69ms
> log: {{{
> 1281.701 creating repository in chroot-132261157529056:///tree/.bzr/.
> 1281.705 creating branch <breezy.bzr.branch.BzrBranchFormat8 object at 0x784a6b0a60a0> in chroot-132261157529056:///tree/
> 1281.712 creating branch reference in file:///mnt/scratch/scratch/tmp/testbzr-u569akfo.tmp/breezy.tests.per_tree.test_path_content_summary.TestPathContentSummary.test_symlink_content_summary%28WorkingTreeFormat6%2Cremote%29/work/tree/
> 1281.730 trying to create missing lock '/mnt/scratch/scratch/tmp/testbzr-u569akfo.tmp/breezy.tests.per_tree.test_path_content_summary.TestPathContentSummary.test_symlink_content_summary(WorkingTreeFormat6,remote)/work/tree/.bzr/checkout/dirstate'
> 1281.731 opening working tree '/mnt/scratch/scratch/tmp/testbzr-u569akfo.tmp/breezy.tests.per_tree.test_path_content_summary.TestPathContentSummary.test_symlink_content_summary(WorkingTreeFormat6,remote)/work/tree'
> }}}
>
> Traceback (most recent call last):
> File "/home/tmp/devel/breezy/work.x86_64/breezy-3.0.1/breezy/tests/test_server.py", line 702, in stop_server
> super(SmartTCPServer_for_testing, self).stop_server()
> File "/home/tmp/devel/breezy/work.x86_64/breezy-3.0.1/breezy/tests/test_server.py", line 571, in stop_server
> self.server.stop_client_connections()
> File "/home/tmp/devel/breezy/work.x86_64/breezy-3.0.1/breezy/tests/test_server.py", line 375, in stop_client_connections
> self.shutdown_client(c)
> File "/home/tmp/devel/breezy/work.x86_64/breezy-3.0.1/breezy/tests/test_server.py", line 480, in shutdown_client
> self.shutdown_socket(sock)
> File "/home/tmp/devel/breezy/work.x86_64/breezy-3.0.1/breezy/tests/test_server.py", line 384, in shutdown_socket
> sock.shutdown(socket.SHUT_RDWR)
> OSError: [Errno 22] Invalid argument
> ```
> I'm not sure why this errno is returned from shutdown, but I suppose for the purposes of the test it can be ignored. (Unless you're passing the wrong file descriptor or something, or there is some bug in Python with the definition of SHUT_RDWR,)
We're not hitting this on Linux (and we run the test suite there quite
a lot). I suspect this is a behaviour in the underlying shutdown()
implementation on NetBSD and Linux.
The Linux manpage for shutdown has a BUGS section that says:
Checks for the validity of how are done in domain-specific code, and
before Linux 3.7 not all domains performed these checks. Most
notably, UNIX domain sockets simply ignored invalid values. This
problem was fixed for UNIX domain sockets in Linux 3.7.
I also wonder passing a socket that's already shutdown perhaps results
in EINVAL.
On Sat, Oct 26, 2019 at 04:44:41PM -0000, Olaf Seibert wrote: test_symlink_ content_ summary( WorkingTreeForm at6,remote) ERROR 69ms 132261157529056 :///tree/ .bzr/. bzr.branch. BzrBranchFormat 8 object at 0x784a6b0a60a0> in chroot- 132261157529056 :///tree/ /mnt/scratch/ scratch/ tmp/testbzr- u569akfo. tmp/breezy. tests.per_ tree.test_ path_content_ summary. TestPathContent Summary. test_symlink_ content_ summary% 28WorkingTreeFo rmat6%2Cremote% 29/work/ tree/ scratch/ tmp/testbzr- u569akfo. tmp/breezy. tests.per_ tree.test_ path_content_ summary. TestPathContent Summary. test_symlink_ content_ summary( WorkingTreeForm at6,remote) /work/tree/ .bzr/checkout/ dirstate' scratch/ tmp/testbzr- u569akfo. tmp/breezy. tests.per_ tree.test_ path_content_ summary. TestPathContent Summary. test_symlink_ content_ summary( WorkingTreeForm at6,remote) /work/tree' tmp/devel/ breezy/ work.x86_ 64/breezy- 3.0.1/breezy/ tests/test_ server. py", line 702, in stop_server erver_for_ testing, self).stop_server() tmp/devel/ breezy/ work.x86_ 64/breezy- 3.0.1/breezy/ tests/test_ server. py", line 571, in stop_server stop_client_ connections( ) tmp/devel/ breezy/ work.x86_ 64/breezy- 3.0.1/breezy/ tests/test_ server. py", line 375, in stop_client_ connections client( c) tmp/devel/ breezy/ work.x86_ 64/breezy- 3.0.1/breezy/ tests/test_ server. py", line 480, in shutdown_client socket( sock) tmp/devel/ breezy/ work.x86_ 64/breezy- 3.0.1/breezy/ tests/test_ server. py", line 384, in shutdown_socket socket. SHUT_RDWR)
> Public bug reported:
>
> I am preparing a package of breezy 3.0.1 on NetBSD's pkgsrc. I am using
> NetBSD/amd64 8.1 and Python 3.7.4.
>
> Several of the tests fail with the same or very similar stack traces:
>
> ```
> ...ary.
> log: {{{
> 1281.701 creating repository in chroot-
> 1281.705 creating branch <breezy.
> 1281.712 creating branch reference in file://
> 1281.730 trying to create missing lock '/mnt/scratch/
> 1281.731 opening working tree '/mnt/scratch/
> }}}
>
> Traceback (most recent call last):
> File "/home/
> super(SmartTCPS
> File "/home/
> self.server.
> File "/home/
> self.shutdown_
> File "/home/
> self.shutdown_
> File "/home/
> sock.shutdown(
> OSError: [Errno 22] Invalid argument
> ```
> I'm not sure why this errno is returned from shutdown, but I suppose for the purposes of the test it can be ignored. (Unless you're passing the wrong file descriptor or something, or there is some bug in Python with the definition of SHUT_RDWR,)
We're not hitting this on Linux (and we run the test suite there quite
a lot). I suspect this is a behaviour in the underlying shutdown()
implementation on NetBSD and Linux.
The Linux manpage for shutdown has a BUGS section that says:
Checks for the validity of how are done in domain-specific code, and
before Linux 3.7 not all domains performed these checks. Most
notably, UNIX domain sockets simply ignored invalid values. This
problem was fixed for UNIX domain sockets in Linux 3.7.
I also wonder passing a socket that's already shutdown perhaps results
in EINVAL.
Jelmer
-- /www.jelmer. uk/D729A457. asc
Jelmer Vernooij <email address hidden>
PGP Key: https:/