fluent: Crash under full load: NIO-ELT-#1 (5): EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
On any save operation, using FluentMySQL or FluentPostgreSQL, calling the route in an infinite loop several times in background processes results in NIO-ELT-#1 (5): EXC_BAD_ACCESS (code=EXC_I386_GPFLT).

Sample loop script:
while [ 1 ]
do
curl --request POST \
--url http://localhost:8080/polls \
--header 'content-type: application/json' \
--data '{
"question": "Okay?",
"startDate": 123,
"endDate": 456
}'
done
After enabling Thread Sanitizer, I got this additional piece of info:
WARNING: ThreadSanitizer: data race (pid=98333)
Write of size 8 at 0x000101bcc320 by thread T5:
#0 RFC1123DateCache.currentTimestamp() RFC1123.swift:64 (HTTP:x86_64+0x79ea9)
#1 HTTPServerHandler.serialize(_:for:ctx:) HTTPServer.swift:226 (HTTP:x86_64+0x6fda9)
#2 closure #1 in HTTPServerHandler.respond(to:body:ctx:) HTTPServer.swift:213 (HTTP:x86_64+0x6f964)
...
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (15 by maintainers)
Thank you for the thread sanitizer info. It indeed looks like
RFC1123DateCachewould need to be thread-local or synchronized-access.Done. 😄
That sounds good. I’ll move on to investigating the UUID generation as well.