Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hardlink in judger plugins #89

Open
Eason0729 opened this issue Sep 4, 2024 · 0 comments
Open

Remove hardlink in judger plugins #89

Eason0729 opened this issue Sep 4, 2024 · 0 comments
Labels
C-Judger Relate to judger good first issue Good for newcomers K-Bug Something isn't working P-Low Low priority

Comments

@Eason0729
Copy link
Contributor

Judger plugin(or language support) is just a tarball with extension(.lang)

We should remove all hardlink in official plugin, so judger won't emit warning to confuse user.

State of art on plugin packaging

When we package official plugin, we use docker export to export a unix-like filesystem in tarball.

There are three type of entry in tarball:

  • regular file
  • symlink: mapped to filesystem in tarball
  • hardlink: should not be mapped to outside world

In current implementation, hardlink would cause judger to emit warning(because hardlink won't be mapped), and accessing it would cause KMEM error.

In addition, docker export treat common device as hardlink, including /dev/null, /dev/random, and our implementation provide such device, so it normally safe to remove.

@Eason0729 Eason0729 added K-Bug Something isn't working P-Low Low priority good first issue Good for newcomers C-Judger Relate to judger labels Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Judger Relate to judger good first issue Good for newcomers K-Bug Something isn't working P-Low Low priority
Projects
None yet
Development

No branches or pull requests

1 participant