oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.46k stars 2.78k forks source link

pino logger on linux result "Operation not permitted" #11831

Open guotie opened 5 months ago

guotie commented 5 months ago

What version of Bun is running?

1.1.12

What platform is your computer?

Linux 6.8.0-1008-aws x86_64 x86_64

What steps can reproduce the bug?

const logger = require('pino')()

logger.info('hello world')

when run on Mac, it's ok;

when run on Linux, throw error:

$ bun run src/tests/logger.ts 
211 |     stream.lastLevel = num
212 |     stream.lastObj = obj
213 |     stream.lastMsg = msg
214 |     stream.lastTime = t.slice(this[timeSliceIndexSym])
215 |     stream.lastLogger = this // for child loggers
216 |   }
      ^
EPERM: Operation not permitted
   errno: -1
 syscall: "write"
      fd: 13

      at write (native:1:1)
      at node:stream:171:43
      at write (/home/ubuntu/xxx/node_modules/pino/lib/proto.js:216:16)
      at LOG (/home/ubuntu/xxx/node_modules/pino/lib/tools.js:133:50)
      at module code (/home/ubuntu/xxx/src/tests/logger.ts:3:8)

Bun v1.1.12 (Linux x64)

What is the expected behavior?

No response

What do you see instead?

No response

Additional information

No response

guotie commented 5 months ago

ts-node runs on linux is ok.