Sublime Forum

Index job Failed to create semaphore

#1

I’m using WSL so I’m guessing this is something weird Microsoft has done. I’ve been using sublime well enough in WSL for a while, but I’ve just installed Ubuntu 24.04 and Sublime and I’m getting the following in the console of sublime. Sublime is also significantly slower to start up (~20 seconds)

indexing [job 1]: failed to create shm channel for worker 4; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 0; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 5; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 1; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 6; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 7; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 8; Failed to create semaphore
indexing [job 1]: failed to create shm channel for worker 2; Failed to create semaphore

Version is 4180, which is also running on Ubuntu 22.04 fine. Anyone got any ideas?

0 Likes

#2

It’s possible you’ve run out of shared memory, does restarting linux fix the issue?

0 Likes

#3

Yeah turn it off and on again was the first thing I tried.
But it doesn’t seem to be anything like that. Output of free -m and lsipc below.

free -m
               total        used        free      shared  buff/cache   available
Mem:           15830        3186       11749         271        1490       12644
Swap:           4096           0        4096

lsipc
RESOURCE DESCRIPTION                                              LIMIT USED  USE%
MSGMNI   Number of message queues                                 32000    0 0.00%
MSGMAX   Max size of message (bytes)                                 8K    -     -
MSGMNB   Default max size of queue (bytes)                          16K    -     -
SHMMNI   Shared memory segments                                    4096    0 0.00%
SHMALL   Shared memory pages                       18446744073692774399    0 0.00%
SHMMAX   Max size of shared memory segment (bytes)                  16E    -     -
SHMMIN   Min size of shared memory segment (bytes)                   1B    -     -
SEMMNI   Number of semaphore identifiers                          32000    0 0.00%
SEMMNS   Total number of semaphores                          1024000000    0 0.00%
SEMMSL   Max semaphores per semaphore set.                        32000    -     -
SEMOPM   Max number of operations per semop(2)                      500    -     -
SEMVMX   Semaphore max value                                      32767    -     -
0 Likes

#4

Do you see any other errors in the console (View > Show Console)?

0 Likes

#5

Nothing really notable. It says it tried to index a file then gave up.

    startup, version: 4180 linux x64 channel: stable
    executable: /opt/sublime_text/sublime_text
    application: /opt/sublime_text
    working dir: /mnt/c/Users/User
    packages path: /home/will/.config/sublime-text/Packages
    state path: /home/will/.config/sublime-text/Local
    zip path: /opt/sublime_text/Packages
    zip path: /home/will/.config/sublime-text/Installed Packages
    ignored_packages: ["Vintage"]
    pre session restore time: 27.457
    startup time: 27.5275
    first paint time: 27.6501
    /....................../ 
Whole bunch of Reload plugins and git tracking stuff 
/........................./
    Package Control: Skipping automatic upgrade, last run at 2024-09-24 08:28:35, next run at 2024-09-24 16:28:35 or after
    worker 0 pid:1415 appears stuck while processing file /home/will/projects/api/somefile.php, killing process and restarting worker
    indexing [job 1]: failed to create shm channel for worker 0; Failed to create semaphore
0 Likes

#6

That’s extremely weird. The plugins use the same exact logic for cross-process communication as the indexer does, so it’s very surprising that it works at startup but not when indexing. Best way to debug might be to run ST under strace and find the sem_open syscall to hopefully figure out why it fails.

0 Likes

#7

So jumped on for work this morning and everything works, like nothing was ever wrong :upside_down_face:
Sublime opened instantly, nothing in the console, indexing seems to be working 100% as it should.

There was some updates from windows on Tuesday, so maybe just chalk it up to something weird they had done. I’ll try to remember to check strace if it pops up again.

Thanks for your help anyway!

0 Likes