---
# System prepended metadata

title: 'Musl WG, October 7, 2022'
tags: [' unikraft', musl]

---

---
title: "Musl WG, October 7, 2022"
tags: musl, unikraft
datetime: 2022-10-07T13:00:00+02:00
location: Online, Discord (https://bit.ly/UnikraftDiscord), the `#monkey-business` voice channel
teams:
- musl
participants:
- Robert
- Simon
- Dragoș
- Florin
- RăzvanD
---

## :dart: Agenda

- Status update
- Next steps

## :closed_book: Discussions

DA: I took a look into the three draft PRs: https://github.com/unikraft/unikraft/pulls

DA: I knew about the implementation from our previous calls.
I tested only the first scheduler PR.

SK: After this PR, `nolibc` will have Linux-style errno numbers.

DA: There are also issues with uksignal.

FP: I updated the musl-libc library to work with `uktest`.
I tried to use it with the pthread support for Musl.

FP: There is an inconsistency between the filesystem use in `nolibc` and `lib-musl`.

RK: We were looking into recursive mutexes in Musl.
And the thread id is wrong.

RK: We could do a workaround to set the thread id to 0.

DA: I think it's the same problem we talked about.
There is a comment in Musl that the thread ID shouldn't matter at this point.

RK: It may happen before the tcb_init.

SK: It may go to Dragoș's code in the TCB.

DA: In `__uk_init_tp()` I set the thread ID and retrieve the thread ID.

DA: This is only for the main thread, because it's not created with `clone`.

SK: The fix I suggest: I would still return that errno, but memorize the address of the thread id that is called.
Then it checks if a thread ID is initialized.

SK: I was thinking when I placed the function in `posix-futex` if it should be located elsewhere, such as `posix-process`.

DA: If we set it to 0, wouldn't that fix the current issue

FP: I need to publish what I have.
Some tests work, some don't.

FP: In the long term, creating a patch file for each source file is a solution.
I think it makes sense to just replace the files.

### Musl vfscore Issue

SK: The problem we have here in uktest.

SK: uktest uses `printf()` instead of using `uk_pr_info()`.
TLS is not allocated at that point.

## :wrench: TODOs and Decisions

DA: Test the other two draft PRs.

RD: Do additional passes over PRs.

SK: Provide support to testing team.

RK: Do a comment on Dragoș's PR to set the thread id to 0.

FP: Create an issue with the `printf()` instead of using `uk_pr_info()`.

FP: Create PR for `libc-test`: https://github.com/unikraft/lib-libc-test

RD: Proposal for meeting on Wednesday, October 12, 2022.