Python 2 and test/vm/netbsd (was Re: [Qemu-devel] [PULL 0/8] Python queue, 2019-06-07)
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
I guess someone™ needs to bisect that regression, so we can fix that bug and finally include Gerd's patch...
Thomas
Re: Python 2 and test/vm/netbsd
Quoted 35 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
Quoted 7 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
I guess someone™ needs to bisect that regression, so we can fix that bug and finally include Gerd's patch...
Thomas
Is this a regression in qemu? How to reproduce the problem? "make vm-build-netbsd V=1" ?
I can have a look but I need to know exact specifics of the problem.
Re: Python 2 and test/vm/netbsd
Quoted 38 lines · Kamil Rytarowski
Quoted 37 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
Quoted 8 lines
Quoted 5 lines
I guess someone™ needs to bisect that regression, so we can fix that bug and finally include Gerd's patch...
Thomas
Is this a regression in qemu? How to reproduce the problem? "make vm-build-netbsd V=1" ?
You'll need to apply the patch from that series:
tests/vm: netbsd autoinstall, using serial
(all the others got merged)
Quoted 1 line
I can have a look but I need to know exact specifics of the problem.
Make sure you've cleared out any cached images. As was mentioned in the thread it seems to be a little host dependant - some host systems it was working and some it was not.
--
Alex Bennée
Re: Python 2 and test/vm/netbsd
Quoted 47 lines · Alex Bennée
Quoted 44 lines · Kamil Rytarowski
Quoted 42 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
I guess someone™ needs to bisect that regression, so we can fix that bug and finally include Gerd's patch...
Thomas
Quoted 6 lines
Quoted 2 lines
Is this a regression in qemu? How to reproduce the problem? "make vm-build-netbsd V=1" ?
You'll need to apply the patch from that series:
tests/vm: netbsd autoinstall, using serial
Patch (mbox for applying with "git am") is still available in Patchew if you don't have it in your local qemu-devel folder anymore:
http://next.patchew.org/QEMU/[email protected]/mbox
Thomas
Re: Python 2 and test/vm/netbsd
In reply to Alex BennéeQuoted 45 lines · Alex Bennée
Quoted 44 lines · Kamil Rytarowski
Quoted 42 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
I guess someone™ needs to bisect that regression, so we can fix that bug and finally include Gerd's patch...
Thomas
Quoted 10 lines
Quoted 2 lines
Is this a regression in qemu? How to reproduce the problem? "make vm-build-netbsd V=1" ?
You'll need to apply the patch from that series:
tests/vm: netbsd autoinstall, using serial
(all the others got merged)
Quoted 1 line
I can have a look but I need to know exact specifics of the problem.
IIRC this is not a NetBSD specific issue, but the NetBSD image triggers the chardev bug reliably.
Quoted 3 lines
Make sure you've cleared out any cached images. As was mentioned in the thread it seems to be a little host dependant - some host systems it was working and some it was not.
Re: Python 2 and test/vm/netbsd
In reply to Thomas HuthQuoted 30 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
Quoted 6 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
The URL above has this error:
con recv: x: Exitqqqqqqqqqqqqqqqqqqqqqqqqqj
con recv: To be able to use the network, we need answers to the following:Network media type
con send: <enter>
con recv: : qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk Perform autoconfiguration?
>a: Yes b: Noqqqqqqqqqqqqqqqqq
console: *** read timeout ***
console: waiting for: 'a: Yes'
console: line buffer:
con recv: qqqqqqqqqqqqqqj
I believe that problem was solved in v4, because v4 was reading the serial output 1 byte at a time.
The issue that caused the netbsd patch to be dropped was:
https://lore.kernel.org/qemu-devel/CAFEAcA8k9QJA9iE-kwiaPhr0fY_2zG7JRX5uV4AaSSjXCSs4+A@mail.gmail.com/
Possibly this is the same issue we saw at:
https://lore.kernel.org/qemu-devel/[email protected]/
The test script must either close the console socket, or keep reading from it. Otherwise, the QEMU VCPU threads might get stuck waiting for the chardev to be writeable.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
Quoted 58 lines · Eduardo Habkost
Quoted 30 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
Quoted 6 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
The URL above has this error:
con recv: x: Exitqqqqqqqqqqqqqqqqqqqqqqqqqj
con recv: To be able to use the network, we need answers to the following:Network media type
con send: <enter>
con recv: : qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk Perform autoconfiguration?
>a: Yes b: Noqqqqqqqqqqqqqqqqq
console: *** read timeout ***
console: waiting for: 'a: Yes'
console: line buffer:con recv: qqqqqqqqqqqqqqj
I believe that problem was solved in v4, because v4 was reading the serial output 1 byte at a time.
The issue that caused the netbsd patch to be dropped was:
https://lore.kernel.org/qemu-devel/CAFEAcA8k9QJA9iE-kwiaPhr0fY_2zG7JRX5uV4AaSSjXCSs4+A@mail.gmail.com/
Quoted 6 lines
Possibly this is the same issue we saw at:
https://lore.kernel.org/qemu-devel/[email protected]/The test script must either close the console socket, or keep reading from it. Otherwise, the QEMU VCPU threads might get stuck waiting for the chardev to be writeable.
It doesn't seem to be the same issue. Even if the console socket is closed, I'm seeing results similar to the ones reported by Peter (the "pkgin -y install" step is unreasonably slow).
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
Quoted 66 lines · Eduardo Habkost
Quoted 58 lines · Eduardo Habkost
Quoted 30 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
Quoted 6 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
The URL above has this error:
con recv: x: Exitqqqqqqqqqqqqqqqqqqqqqqqqqj
con recv: To be able to use the network, we need answers to the following:Network media type
con send: <enter>
con recv: : qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk Perform autoconfiguration?
>a: Yes b: Noqqqqqqqqqqqqqqqqq
console: *** read timeout ***
console: waiting for: 'a: Yes'
console: line buffer:con recv: qqqqqqqqqqqqqqj
I believe that problem was solved in v4, because v4 was reading the serial output 1 byte at a time.
The issue that caused the netbsd patch to be dropped was:
https://lore.kernel.org/qemu-devel/CAFEAcA8k9QJA9iE-kwiaPhr0fY_2zG7JRX5uV4AaSSjXCSs4+A@mail.gmail.com/Quoted 6 lines
Possibly this is the same issue we saw at:
https://lore.kernel.org/qemu-devel/[email protected]/The test script must either close the console socket, or keep reading from it. Otherwise, the QEMU VCPU threads might get stuck waiting for the chardev to be writeable.
Quoted 6 lines
It doesn't seem to be the same issue. Even if the console socket is closed, I'm seeing results similar to the ones reported by Peter (the "pkgin -y install" step is unreasonably slow).
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4. I don't know if this is a NetBSD bug, or a slirp bug.
Output of strace -e trace=network below:
1571352260.348566 recvfrom(30, "~[\201\200\0\1\0\1\0\0\0\0\3ftp\6NetBSD\3org\0\0\1\0\1"..., 1500, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.5.30.160")}, [128->16]) = 48 <0.000016> 1571352260.349030 socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 31 <0.000041>
1571352260.349142 setsockopt(31, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 <0.000009>
1571352260.349179 setsockopt(31, SOL_SOCKET, SO_OOBINLINE, [1], 4) = 0 <0.000007>
1571352260.349207 setsockopt(31, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000008>
1571352260.349239 connect(31, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864), inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000 021>
1571352266.350112 socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 31 <0.000131>
1571352266.350603 setsockopt(31, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 <0.000183>
1571352266.350946 setsockopt(31, SOL_SOCKET, SO_OOBINLINE, [1], 4) = 0 <0.000047>
1571352266.351109 setsockopt(31, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000043>
1571352266.351260 connect(31, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864), inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000070> 1571352278.357962 socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 29 <0.000166>
1571352278.358524 setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 <0.000046>
1571352278.358757 setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4) = 0 <0.000046>
1571352278.358950 setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000039>
1571352278.359103 connect(29, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864), inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000065> 1571352302.373056 socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 29 <0.000323>
1571352302.373909 setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 <0.000162>
1571352302.374331 setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4) = 0 <0.000159>
1571352302.374626 setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000050>
1571352302.374857 connect(29, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864), inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000070> 1571352335.394568 socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 29 <0.000091>
1571352335.394796 setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0 <0.000011>
1571352335.394848 setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4) = 0 <0.000009>
1571352335.394883 setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4) = 0 <0.000008>
1571352335.394913 connect(29, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("199.233.217.201")}, 16) = -1 EINPROGRESS (Operation now in progress) <0.000055>
1571352335.587395 sendto(29, "", 0, 0, NULL, 0) = 0 <0.000220>
1571352335.589650 sendto(29, "GET /pub/pkgsrc/packages/NetBSD/"..., 81, 0, NULL, 0) = 81 <0.000088>
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
Quoted 71 lines · Eduardo Habkost
Quoted 70 lines · Eduardo Habkost
Quoted 58 lines · Eduardo Habkost
Quoted 30 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
Quoted 6 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
The URL above has this error:
con recv: x: Exitqqqqqqqqqqqqqqqqqqqqqqqqqj
con recv: To be able to use the network, we need answers to the following:Network media type
con send: <enter>
con recv: : qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk Perform autoconfiguration?
>a: Yes b: Noqqqqqqqqqqqqqqqqq
console: *** read timeout ***
console: waiting for: 'a: Yes'
console: line buffer:con recv: qqqqqqqqqqqqqqj
I believe that problem was solved in v4, because v4 was reading the serial output 1 byte at a time.
The issue that caused the netbsd patch to be dropped was:
https://lore.kernel.org/qemu-devel/CAFEAcA8k9QJA9iE-kwiaPhr0fY_2zG7JRX5uV4AaSSjXCSs4+A@mail.gmail.com/Quoted 6 lines
Possibly this is the same issue we saw at:
https://lore.kernel.org/qemu-devel/[email protected]/The test script must either close the console socket, or keep reading from it. Otherwise, the QEMU VCPU threads might get stuck waiting for the chardev to be writeable.
It doesn't seem to be the same issue. Even if the console socket is closed, I'm seeing results similar to the ones reported by Peter (the "pkgin -y install" step is unreasonably slow).
Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4. I don't know if this is a NetBSD bug, or a slirp bug.
Does it work better if you turn IPv6 off? E.g.:
tests/vm/basevm.py +1 -1
@@ -81,7 +81,7 @@ class BaseVM(object): self._args = [ \ "-nodefaults", "-m", "4G", "-cpu", "max", - "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22", + "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22,ipv6=off", "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20"] if vcpus and vcpus > 1:
Thomas
Quoted 32 lines
Output of
strace -e trace=networkbelow:1571352260.348566 recvfrom(30, "~[\201\200\0\1\0\1\0\0\0\0\3ftp\6NetBSD\3org\0\0\1\0\1"..., 1500, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.5.30.160")}, [128->16]) = 48 <0.000016> 1571352260.349030
socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP)= 31 <0.000041>
1571352260.349142setsockopt(31, SOL_SOCKET, SO_REUSEADDR, [1], 4)= 0 <0.000009>
1571352260.349179setsockopt(31, SOL_SOCKET, SO_OOBINLINE, [1], 4)= 0 <0.000007>
1571352260.349207setsockopt(31, SOL_TCP, TCP_NODELAY, [1], 4)= 0 <0.000008>
1571352260.349239 connect(31, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864),inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000 021>
1571352266.350112socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP)= 31 <0.000131>
1571352266.350603setsockopt(31, SOL_SOCKET, SO_REUSEADDR, [1], 4)= 0 <0.000183>
1571352266.350946setsockopt(31, SOL_SOCKET, SO_OOBINLINE, [1], 4)= 0 <0.000047>
1571352266.351109setsockopt(31, SOL_TCP, TCP_NODELAY, [1], 4)= 0 <0.000043>
1571352266.351260 connect(31, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864),inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000070> 1571352278.357962socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP)= 29 <0.000166>
1571352278.358524setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4)= 0 <0.000046>
1571352278.358757setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4)= 0 <0.000046>
1571352278.358950setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4)= 0 <0.000039>
1571352278.359103 connect(29, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864),inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000065> 1571352302.373056socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP)= 29 <0.000323>
1571352302.373909setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4)= 0 <0.000162>
1571352302.374331setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4)= 0 <0.000159>
1571352302.374626setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4)= 0 <0.000050>
1571352302.374857 connect(29, {sa_family=AF_INET6, sin6_port=htons(80), sin6_flowinfo=htonl(67108864),inet_pton(AF_INET6, "2001:470:a085:999::21", &sin6_addr), sin6_scope_id=377348480}, 28) = -1 ENETUNREACH (Network is unreachable) <0.000070> 1571352335.394568socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP)= 29 <0.000091>
1571352335.394796setsockopt(29, SOL_SOCKET, SO_REUSEADDR, [1], 4)= 0 <0.000011>
1571352335.394848setsockopt(29, SOL_SOCKET, SO_OOBINLINE, [1], 4)= 0 <0.000009>
1571352335.394883setsockopt(29, SOL_TCP, TCP_NODELAY, [1], 4)= 0 <0.000008>
1571352335.394913connect(29, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("199.233.217.201")}, 16)= -1 EINPROGRESS (Operation now in progress) <0.000055>
1571352335.587395sendto(29, "", 0, 0, NULL, 0)= 0 <0.000220>
1571352335.589650sendto(29, "GET /pub/pkgsrc/packages/NetBSD/"..., 81, 0, NULL, 0)= 81 <0.000088>
Re: Python 2 and test/vm/netbsd
In reply to Eduardo HabkostHi,
Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4.
Ah, that nicely explains why it worked just fine for me. First, I have a local proxy configured so the installer isn't going to connect to ftp.NetBSD.org directly. Second I have IPv6 connectivity.
Quoted 1 line
I don't know if this is a NetBSD bug, or a slirp bug.
Both I'd say ...
First, by default slirp should not send IPv6 router announcements to the user network if the host has no IPv6 connectivity.
Second, the recommended way to connect is to try ipv4 and ipv6 in parallel, then use whatever connects first. Web browsers typically do it that way. wget and curl don't do that though, they try one address after the other, and I guess this is where the delay comes from ...
cheers,
Gerd
Re: Python 2 and test/vm/netbsd
Quoted 18 lines · Gerd Hoffmann
Hi,
Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4.
Ah, that nicely explains why it worked just fine for me. First, I have a local proxy configured so the installer isn't going to connect to ftp.NetBSD.org directly. Second I have IPv6 connectivity.
Quoted 1 line
I don't know if this is a NetBSD bug, or a slirp bug.
Both I'd say ...
Quoted 8 lines
First, by default slirp should not send IPv6 router announcements to the user network if the host has no IPv6 connectivity.
Second, the recommended way to connect is to try ipv4 and ipv6 in parallel, then use whatever connects first. Web browsers typically do it that way. wget and curl don't do that though, they try one address after the other, and I guess this is where the delay comes from ...
In addition to that, the connect() error should be generating a ICMP6_UNREACH message, and I'd expect the NetBSD guest to notice it instead of waiting for timeout.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
In reply to Thomas HuthQuoted 86 lines · Thomas Huth
Quoted 71 lines · Eduardo Habkost
Quoted 70 lines · Eduardo Habkost
Quoted 58 lines · Eduardo Habkost
Quoted 30 lines · Thomas Huth
Quoted 18 lines · Eduardo Habkost
Quoted 2 lines · Eduardo Habkost
Quoted 1 line · Eduardo Habkost
On Mon, Jun 10, 2019 at 01:58:50PM +0100, Peter Maydell wrote:
[...]
Quoted 6 lines
Quoted 6 lines
Quoted 3 lines
The configure check also spits out deprecation warnings for the NetBSD/FreeBSD/OpenBSD tests/vm configurations. It would be nice to get those updated.
CCing the test/vm maintainers.
Quoted 7 lines
Quoted 4 lines
Fam, Alex, are you able to fix this and create new BSD VM images with Python 3 available? I thought the VM image configurations were stored in the source tree, but they are downloaded from download.patchew.org.
Fam, Alex, can you help us on this? Python 2 won't be supported anymore, so we need the VM images to be updated.
Quoted 7 lines
Anyone?
I'm about to submit patches to remove Python 2 support, and this will break tests/vm/netbsd.
I'm powerless to fix this issue, because the netbsd image is hosted at download.patchew.org.
Gerd had a patch to convert the netbsd VM script to ad hoc image creation, too:
Quoted 6 lines
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg04459.html
But there was a regression with the serial port between QEMU v3.0 and v4.x, so it was not included:
https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg06784.html
The URL above has this error:
con recv: x: Exitqqqqqqqqqqqqqqqqqqqqqqqqqj
con recv: To be able to use the network, we need answers to the following:Network media type
con send: <enter>
con recv: : qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk Perform autoconfiguration?
>a: Yes b: Noqqqqqqqqqqqqqqqqq
console: *** read timeout ***
console: waiting for: 'a: Yes'
console: line buffer:con recv: qqqqqqqqqqqqqqj
I believe that problem was solved in v4, because v4 was reading the serial output 1 byte at a time.
The issue that caused the netbsd patch to be dropped was:
https://lore.kernel.org/qemu-devel/CAFEAcA8k9QJA9iE-kwiaPhr0fY_2zG7JRX5uV4AaSSjXCSs4+A@mail.gmail.com/Quoted 6 lines
Possibly this is the same issue we saw at:
https://lore.kernel.org/qemu-devel/[email protected]/The test script must either close the console socket, or keep reading from it. Otherwise, the QEMU VCPU threads might get stuck waiting for the chardev to be writeable.
It doesn't seem to be the same issue. Even if the console socket is closed, I'm seeing results similar to the ones reported by Peter (the "pkgin -y install" step is unreasonably slow).
Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4. I don't know if this is a NetBSD bug, or a slirp bug.
Does it work better if you turn IPv6 off? E.g.:
tests/vm/basevm.py class BaseVM(object): · line 87
Quoted 8 lines
tests/vm/basevm.py +1
-1@@ -81,7 +81,7 @@ class BaseVM(object): self._args = [ \ "-nodefaults", "-m", "4G", "-cpu", "max", - "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22", + "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22,ipv6=off", "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20"] if vcpus and vcpus > 1:
Yes, it is much better. Thanks!
I will send a series disabling ipv6 in tests/vm/netbsd as a workaround.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
In reply to Eduardo HabkostQuoted 28 lines · Eduardo Habkost
Quoted 18 lines · Gerd Hoffmann
Hi,Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4.
Ah, that nicely explains why it worked just fine for me. First, I have a local proxy configured so the installer isn't going to connect to ftp.NetBSD.org directly. Second I have IPv6 connectivity.
Quoted 1 line
I don't know if this is a NetBSD bug, or a slirp bug.
Both I'd say ...
Quoted 8 lines
First, by default slirp should not send IPv6 router announcements to the user network if the host has no IPv6 connectivity.
Second, the recommended way to connect is to try ipv4 and ipv6 in parallel, then use whatever connects first. Web browsers typically do it that way. wget and curl don't do that though, they try one address after the other, and I guess this is where the delay comes from ...
Quoted 3 lines
In addition to that, the
connect()error should be generating aICMP6_UNREACHmessage, and I'd expect the NetBSD guest to notice it instead of waiting for timeout.
Is this missing in SLiRP?
Re: Python 2 and test/vm/netbsd
Philippe Mathieu-Daudé, le ven. 18 oct. 2019 16:58:00 +0200, a ecrit:
Quoted 29 lines · Eduardo Habkost
Quoted 28 lines · Gerd Hoffmann
Quoted 26 lines
Hi,Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4.
Ah, that nicely explains why it worked just fine for me. First, I have a local proxy configured so the installer isn't going to connect to ftp.NetBSD.org directly. Second I have IPv6 connectivity.
Quoted 1 line
I don't know if this is a NetBSD bug, or a slirp bug.
Both I'd say ...
First, by default slirp should not send IPv6 router announcements to the user network if the host has no IPv6 connectivity.
Second, the recommended way to connect is to try ipv4 and ipv6 in parallel, then use whatever connects first. Web browsers typically do it that way. wget and curl don't do that though, they try one address after the other, and I guess this is where the delay comes from ...
Quoted 5 lines
Quoted 3 lines
In addition to that, the
connect()error should be generating aICMP6_UNREACHmessage, and I'd expect the NetBSD guest to notice it instead of waiting for timeout.Is this missing in SLiRP?
It was implemented at the time of introduction of IPv6 in SLIRP. Perhaps NetBSD has a slightly different behavior which makes the implementation fail to notice the error.
Samuel
Re: Python 2 and test/vm/netbsd
Quoted 34 lines · Samuel Thibault
Philippe Mathieu-Daudé, le ven. 18 oct. 2019 16:58:00 +0200, a ecrit:
Quoted 33 lines · Eduardo Habkost
Quoted 31 lines · Gerd Hoffmann
Quoted 18 lines
Hi,Quoted 7 lines
Quoted 2 lines
Running with V=1, I see packages being downloaded at reasonable speeds, but there's a huge interval (of various minutes) between each package download.
I've found the cause for the slowness I'm seeing: for each file being downloaded, the guest spents at least 75 seconds trying to connect to the IPv6 address of ftp.NetBSD.org, before trying IPv4.
Ah, that nicely explains why it worked just fine for me. First, I have a local proxy configured so the installer isn't going to connect to ftp.NetBSD.org directly. Second I have IPv6 connectivity.
Quoted 1 line
I don't know if this is a NetBSD bug, or a slirp bug.
Both I'd say ...
Quoted 8 lines
First, by default slirp should not send IPv6 router announcements to the user network if the host has no IPv6 connectivity.
Second, the recommended way to connect is to try ipv4 and ipv6 in parallel, then use whatever connects first. Web browsers typically do it that way. wget and curl don't do that though, they try one address after the other, and I guess this is where the delay comes from ...
In addition to that, the
connect()error should be generating aICMP6_UNREACHmessage, and I'd expect the NetBSD guest to notice it instead of waiting for timeout.
Quoted 5 lines
Quoted 1 line
Is this missing in SLiRP?
It was implemented at the time of introduction of IPv6 in SLIRP. Perhaps NetBSD has a slightly different behavior which makes the implementation fail to notice the error.
If anybody is interested in investigating it, a network traffic dump generated by -object filter-dump is attached.
Signature · 1 line
Eduardo
Re: Python 2 and test/vm/netbsd
In reply to Samuel ThibaultSamuel Thibault, le ven. 18 oct. 2019 18:00:19 +0200, a ecrit:
Quoted 11 lines
Philippe Mathieu-Daudé, le ven. 18 oct. 2019 16:58:00 +0200, a ecrit:
Quoted 6 lines · Eduardo Habkost
Quoted 3 lines
In addition to that, the
connect()error should be generating aICMP6_UNREACHmessage, and I'd expect the NetBSD guest to notice it instead of waiting for timeout.Is this missing in SLiRP?
It was implemented at the time of introduction of IPv6 in SLIRP. Perhaps NetBSD has a slightly different behavior which makes the implementation fail to notice the error.
It definitely is there in tcp_input(): on tcp_fconnect() error an ICMP6_UNREACH message is sent. I can confirm that this works with a Linux host and Linux guest.
Samuel
Re: Python 2 and test/vm/netbsd
In reply to Eduardo HabkostEduardo Habkost, le ven. 18 oct. 2019 13:41:43 -0300, a ecrit:
Quoted 7 lines · Samuel Thibault
Quoted 3 lines
It was implemented at the time of introduction of IPv6 in SLIRP. Perhaps NetBSD has a slightly different behavior which makes the implementation fail to notice the error.
If anybody is interested in investigating it, a network traffic dump generated by
-object filter-dumpis attached.
The dump does show the Destination Unreachable icmp message, so it seems it's the guest which does not notice it for some reason.
Samuel
Re: Python 2 and test/vm/netbsd
Quoted 6 lines · Samuel Thibault
Eduardo Habkost, le ven. 18 oct. 2019 13:41:43 -0300, a ecrit:
Quoted 5 lines · Samuel Thibault
Quoted 3 lines
It was implemented at the time of introduction of IPv6 in SLIRP. Perhaps NetBSD has a slightly different behavior which makes the implementation fail to notice the error.
Quoted 8 lines
Quoted 2 lines
If anybody is interested in investigating it, a network traffic dump generated by
-object filter-dumpis attached.The dump does show the Destination Unreachable icmp message, so it seems it's the guest which does not notice it for some reason.
Samuel
I will try to investigate it on the NetBSD kernel level.