Skip to content

Conversation

@1000TurquoisePogs
Copy link
Member

Testing within zowe/zowe-install-packaging#4447 revealed some limitations. This PR fixes a bug in which socketClose was attempted when there was no socket to close - the call has now been moved to the other side of the conditional in which the server socket exists.

@MarkAckert
Copy link
Member

MarkAckert commented Aug 12, 2025

The S0C4 moved to successful binds:

_BPX_JOBNAME=WHOSV ./bind-test --host 0.0.0.0 --port 10442
Bind succeeded (pointer=0x1B100098, rc=0x0, rsn=0x0)
CEE3204S The system detected a protection exception (System Completion Code=0C4).
         From compile unit ZZOW11:../../deps/zowe-common-c/c/bpxskt.c/ at entry point socketClose at statement 1674 at compile unit offset +000000001A70C594 at entry offset +000000000000004C at address 000000001A70C594.
SIGSEGV

It seems like the bind-util can't detect ports in use when the host parameter is different than the running application. For example, z/OSMF is running on 10443 below using the system host, and this returns bind success:

_BPX_JOBNAME=WHOSV ./bind-test --host 127.0.0.1 --port 10443
Resolved IP address as 127.0.0.1
Bind succeeded (pointer=0x1B0FD098, rc=0x0, rsn=0x0)
CEE3204S The system detected a protection exception (System Completion Code=0C4).

Similar to above, bind-util can detect a running Zowe instance, but only when using 0.0.0.0, not loopback:

_BPX_JOBNAME=WHOSV ./bind-test --host 127.0.0.1 --port 7554
Resolved IP address as 127.0.0.1
Bind succeeded (pointer=0x1B0FD098, rc=0x0, rsn=0x0)
CEE3204S The system detected a protection exception (System Completion Code=0C4).
_BPX_JOBNAME=WHOSV ./bind-test --host 0.0.0.0 --port 7554
Error: Bind failed (rc=0x45b, rsn=0x744c7247)
Error: Port 7554 was already occupied

Copy link
Contributor

@Martin-Zeithaml Martin-Zeithaml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: 1000TurquoisePogs <[email protected]>
@Martin-Zeithaml
Copy link
Contributor

This was previously abending, now working fine:

/zss/bin: _BPX_JOBNAME=ZWESLSTC ./bind-test --host 10.20.30.40 --port 7556
Resolved IP address as 10.20.30.40
Bind succeeded (pointer=0x3B08D098, rc=0x0, rsn=0x0)

@1000TurquoisePogs 1000TurquoisePogs merged commit 3d0dd86 into v3.x/staging Aug 13, 2025
8 of 9 checks passed
@1000TurquoisePogs 1000TurquoisePogs deleted the bugfix/v3/socket-close-bind-test branch October 3, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants