Closed shenfu1991 closed 9 months ago
Because the program has crashed, the PID cannot be known and therefore the nio-diagnose.md file cannot be produced.
This crash is in your code:
0 0x00007fcf719240b3 swift::RefCounts >::incrementSlow(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 35 in libswiftCore.so
1 [ra] 0x00007fcf7192bfbb swift_bridgeObjectRetain + 26 in libswiftCore.so
2 [ra] [system] 0x0000562f2368c538 getDetails #1 (vc:) in routes(_:) + 743 in tbx_4 at /root/tbx_4/x-bot/
3 [ra] [inlined] 0x0000562f2368d60c specialized Sequence.forEach(_:) in tbx_4 at /root/tbx_4/x-bot/Sources/tbx_4/routes.swift:171:24
It is overwhelmingly likely that this is a thread-safety issue, where you are reading/modifying some state on multiple threads at the same time. That will lead to this crash on the retain call, where you are attempting to retain an object that has been deallocated. I recommend you use thread sanitizer to try to diagnose this issue. However, this is not a NIO bug.
Expected behavior
[what you expected to happen] Running well
Actual behavior
[what actually happened] crashed
Steps to reproduce
This is a quantification program running on swift vapor. It crashed suddenly after running for a few days, and the phenomenon could not be reproduced immediately.
If possible, minimal yet complete reproducer code (or URL to code)
[anything to help us reproducing the issue]
SwiftNIO version/commit hash
[the SwiftNIO tag/commit hash]
System & version information
Please provide at the very least your operating system and Swift version information.
Ideally, run
and attach (or paste) the resulting file
nio-diagnose.md
into this bug report or send it to the SwiftNIO maintainers privately.OS: ubuntu20.04 swift-nio vertsion: 2.63.0 Swift version 5.9.2 (swift-5.9.2-RELEASE) Target: x86_64-unknown-linux-gnu
crash log: