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

Fatal error: Not enough bits to represent a signed value #125

Closed
ianpartridge opened this issue Feb 22, 2018 · 7 comments
Closed

Fatal error: Not enough bits to represent a signed value #125

ianpartridge opened this issue Feb 22, 2018 · 7 comments

Comments

@ianpartridge
Copy link
Contributor

Reported on Slack by @Davidde94 - his Kitura app crashes intermittently with this:

Fatal error: Not enough bits to represent a signed value
Current stack trace:
0    libswiftCore.so      0x00007f1349f2900b    _swift_stdlib_reportFatalError + 171
1    libswiftCore.so      0x00007f1349ece9ff    _T0s18_fatalErrorMessages5NeverOs12StaticStringV_A2E4fileSu4lines6UInt32V5flagstFySRys5UInt8VGcfU0_yAMcfU_TA + 63
2    libswiftCore.so      0x00007f1349c2dafb    _T0s12StaticStringV14withUTF8BufferxxSRys5UInt8VGclFyt_Tgq508_T0SRys5F17VGIxy_ACytIxyr_TRAFIxy_Tfq1ncn_n + 203
3    libswiftCore.so      0x00007f1349e856c1    _T0s18_fatalErrorMessages5NeverOs12StaticStringV_A2E4fileSu4lines6UInt32V5flagstFySRys5UInt8VGcfU0_TA + 113
4    libswiftCore.so      0x00007f1349c2dafb    _T0s12StaticStringV14withUTF8BufferxxSRys5UInt8VGclFyt_Tgq508_T0SRys5F17VGIxy_ACytIxyr_TRAFIxy_Tfq1ncn_n + 203
5    libswiftCore.so      0x00007f1349dc5ff0    _T0s18_fatalErrorMessages5NeverOs12StaticStringV_A2E4fileSu4lines6UInt32V5flagstFTfq4nnddn_n + 96
6    libswiftCore.so      0x00007f1349c00609    _T0s13SignedIntegerPss010FixedWidthB0RzsAARzlExqd__cs06BinaryB0Rd__lufC + 8345
7    Backend              0x000000000095b13b    _T0SC6fd_setV6SocketE7address33_213EB2A589E5E29E2D222F80686A30D9LLSi_s5Int32VtAG3for_tFZ + 2475 at SocketUtils.swift:157
8    Backend              0x000000000095b37c    _T0SC6fd_setV6SocketE0B0ys5Int32VF + 44 at SocketUtils.swift:178
9    Backend              0x000000000092a5a0    _T06SocketAAC7connectySS2to_s5Int32V4portSu7timeouttKF + 7712 at Socket.swift:1736
10   Backend              0x0000000000c101ba    _T09SwiftSMTP10SMTPSocketV7connectySS2to_s5Int32V4portSu7timeouttKF + 138 at SMTPSocket.swift:33
11   Backend              0x0000000000be7fbc    _T09SwiftSMTP5LoginC7connect33_83AAF80632C930E301D940B8BBDEBF87LLys5Int32VKF + 396 at Login.swift:79
12   Backend              0x0000000000be891c    _T09SwiftSMTP5LoginC13loginToServer33_83AAF80632C930E301D940B8BBDEBF87LLyyKF + 1628 at Login.swift:88
13   Backend              0x0000000000be7c0d    _T09SwiftSMTP5LoginC5loginyyF + 189 at Login.swift:69
14   Backend              0x0000000000c067fb    _T09SwiftSMTP0B0V4sendySayAA4MailVG_yAF_s5Error_pSgtcSg8progressyAG_SayAF_sAH_ptGtcSg10completiontF + 3099 at SMTP.swift:180
15   Backend              0x0000000000c059f3    _T09SwiftSMTP0B0V4sendyAA4MailV_ys5Error_pSgcSg10completiontF + 3859 at SMTP.swift:126
16   Backend              0x00000000006da99a    _T010BackendLib12TenantFacadeC17handleBookViewingy6Kitura13RouterRequestC7request_AE0I8ResponseC8responsetFZyyKcfU_yycfU_ + 3050 at TenantFacade.swift:169
17   Backend              0x00000000006e5ba5    _T010BackendLib12TenantFacadeC17handleBookViewingy6Kitura13RouterRequestC7request_AE0I8ResponseC8responsetFZyyKcfU_yycfU_TA + 1157 at TenantFacade.swift:0
18   Backend              0x00000000005e3419    _T0Ix_IyB_TR + 41 at Employee.swift:0
19   libdispatch.so       0x00007f134a437fb7    _dispatch_call_block_and_release + 7
20   libdispatch.so       0x00007f134a446eb5    _dispatch_worker_thread + 917
21   libpthread.so.0      0x00007f1348dad6ba    start_thread + 202
22   libc.so.6                          0x00007f1346f103b0 clone + 109
run.sh: line 11:  2718 Illegal instruction     (core dumped) .build/debug/Backend

Any thoughts @billabt ?

@ianpartridge
Copy link
Contributor Author

Looks like the connect() failed with EINPROGRESS and we crashed setting up for the select()

@billabt
Copy link
Collaborator

billabt commented Feb 22, 2018

Need more info or a repro scenario. It’d also be helpful to know if socket in question was in blocking mode or unblocked.

I’m still recovering from surgery last week but hopefully should be able to look at it either over the weekend or Monday.

@billabt
Copy link
Collaborator

billabt commented Feb 22, 2018

I suspect that this problem and also the problem being seen in issue #123 is related to changes made in PR #110 and it's related PRs. I never saw any of these problems prior to accepting that PR. I think there's a bug still lurking in there.

I've reached out to the author of that PR, @AlanQuatermain, to see if he has any insight into what could be causing the problems. Since the problems never existed (or were never reported) before applying this PR, I'm considering rolling it back out. Hopefully @AlanQuatermain has an answer. If not, I'll roll it back until we can figure out what's going on in the new code...

@billabt
Copy link
Collaborator

billabt commented Feb 22, 2018

Issue #120 is basically the same problem...

@ianpartridge
Copy link
Contributor Author

See #126 for a possible fix.

@Davidde94
Copy link

@ianpartridge will try the fix now and let you know :)

@billabt
Copy link
Collaborator

billabt commented Feb 23, 2018

Fixed in 0.12.93.

@billabt billabt closed this as completed Feb 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants