Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS sockets broken #428

Open
eliotmiranda opened this issue Oct 2, 2019 · 4 comments
Open

macOS sockets broken #428

eliotmiranda opened this issue Oct 2, 2019 · 4 comments

Comments

@eliotmiranda
Copy link
Contributor

eliotmiranda commented Oct 2, 2019

On macOS High Sierra 10.13.6 in 32-bit and 64-bit:

If NetNameResolver useOldNetwork == false then only 1 SocketTest test passes, 2 fail and 11 raise errors. The plugin reports connect errors, one for each error:

sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family
sqConnectToAddressSize: Address family not supported by protocol family

If NetNameResolver useOldNetwork == true then only one test passes and there are 13 failures. Many (all?) fail with waitForConnectionFor:ifTimedOut:ifRefused: timing out. However, no errors are reported from the plugin.

@krono
Copy link
Member

krono commented Sep 17, 2020

When using new network, the tests use an IPv6-based localhost address for binding and connecting.

The local socket is opened in setUp:

setUp

	listenerSocket := Socket newTCP listenOn: self listenerPort backlogSize: 4 interface: self listenerAddress.

The listenerAddress is derived as follows:

^ NetNameResolver addressForName: 'localhost'

In oldNetwork, that's an IPv4, in !oldNetwork that's an IPv6. this is good

However, the Socket is created as newTCP, that is, explicitely IPv4:

newTCP
	"Create a socket and initialise it for TCP"
	^self newTCP: SocketAddressInformation addressFamilyINET4

This is bad. This is where the Error message comes from.

This should be changed to use the address familty that fits best to the current old/new-network.

On top of that, #listenOn:backlogSize: interface: solely deals with IPv4 adresses.

The correct way is to use the indirection of SocketAddressInformation in #listenWithBacklog:.
This deals correctly with the address family.

Things to do:

  • fix the test setup to use the SAI info and/or discriminate old/new network
  • maybe Bail in the socket plugin earlier when a new-network socket is used in old-network-ipv4-only code.

@krono
Copy link
Member

krono commented Oct 20, 2020

wait, this is fixed?

@eliotmiranda
Copy link
Contributor Author

Oops. I was over optimistic. I assumed that Levente'se poll change applied to Mac. It doesn't. Mac needs kqueue. I'm reopening.

@eliotmiranda eliotmiranda reopened this Oct 20, 2020
@krono
Copy link
Member

krono commented Oct 20, 2020

marvelous :D

hogoww referenced this issue in hogoww/opensmalltalk-vm Dec 23, 2021
hogoww referenced this issue in hogoww/opensmalltalk-vm Dec 23, 2021
…ethod [ isValidObjStackAt: ] KILLED by 1/29 test cases.
hogoww referenced this issue in hogoww/opensmalltalk-vm Dec 29, 2021
hogoww referenced this issue in hogoww/opensmalltalk-vm Dec 29, 2021
…ue] ] on method [ freeTreeNodesDo: ] KILLED by 1/234 test cases.
hogoww referenced this issue in hogoww/opensmalltalk-vm Feb 26, 2022
hogoww referenced this issue in hogoww/opensmalltalk-vm Feb 26, 2022
…[ popObjStack: ] 10/14 Test Cases are NOT EQUIVALENT
guillep added a commit to tesonep/opensmalltalk-vm that referenced this issue May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants