Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Why is the /tmp/pkg file created every execution #1606

Closed
luckyyyyy opened this issue Apr 28, 2022 · 9 comments
Closed

Why is the /tmp/pkg file created every execution #1606

luckyyyyy opened this issue Apr 28, 2022 · 9 comments

Comments

@luckyyyyy
Copy link

luckyyyyy commented Apr 28, 2022

What version of pkg are you using?

5.6.0

What version of Node.js are you using?

any

What operating system are you using?

linux

What CPU architecture are you using?

x86_64

What Node versions, OSs and CPU architectures are you building for?

node16

Describe the Bug

image

@robertsLando
Copy link
Contributor

It's not a file, it's a folder. Inside that folder we copy .node addons files

@luckyyyyy
Copy link
Author

luckyyyyy commented Apr 28, 2022

It's not a file, it's a folder. Inside that folder we copy .node addons files

What is pkg-xxxxxx? will be created on every execution. This was not the case with previous versions.

@luckyyyyy
Copy link
Author

what are these? I know that will copy node files @robertsLando

image

@robertsLando
Copy link
Contributor

Check this: #1492

@robertsLando
Copy link
Contributor

robertsLando commented Apr 28, 2022

each one of that is a sha of the node addon file, the mentioned PR force copy node files there on every boot

@luckyyyyy
Copy link
Author

each one of that is a sha of the node addon file, the mentioned PR force copy node files there on every boot

Should these pkg-xxxx files be cleaned up? Although the OS will clean up

@luckyyyyy
Copy link
Author

each one of that is a sha of the node addon file, the mentioned PR force copy node files there on every boot

I've confirmed a bug where my app starts multiple worker_threads at the same time, and every time they start, they re-copy and generate files.
So when they start at the same time, there will be an error.

file already exists or bus error or file too short

@robertsLando
Copy link
Contributor

Would you like to submiit a PR to fix this issue?

@luckyyyyy
Copy link
Author

Would you like to submiit a PR to fix this issue?

I haven't thought of a reasonable fix for the time being, I'll think about it first

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants