Open marvinhagemeister opened 1 week ago
It seems like we have a bug with the Atomics
API. Under the hood pino
shells out to the thread-stream
package which uses this code where Deno is stuck:
stream.flushSync()
let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX)
Atomics.store(stream[kImpl].state, WRITE_INDEX, -1)
Atomics.notify(stream[kImpl].state, WRITE_INDEX)
// Wait for the process to complete
let spins = 0
while (readIndex !== -1) {
Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000)
readIndex = Atomics.load(stream[kImpl].state, READ_INDEX)
if (readIndex === -2) {
destroy(stream, new Error('end() failed'))
return
}
if (++spins === 10) {
destroy(stream, new Error('end() took too long (10s)'))
return
}
}
Odd, I know we have a bug with Atomics.waitAsync
, but Atomics.wait
should work. I can take a look on monday
I am observing this issue as well. No logs are being outputted to the console. On Ubuntu OS.
my settings:
const loggerModule = LoggerModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: (configService: ConfigService) => ({
pinoHttp: {
level: configService.get('NODE_ENV') === 'development' ? 'debug' : 'warn',
transport:
configService.get('NODE_ENV') === 'development'
? {
target: 'pino-pretty',
options: {
singleLine: true
}
}
: undefined
}
})
});
Discussed in https://github.com/denoland/deno/discussions/26150