Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]trouble with mmap() shared mem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1708
Location: Switzerland (Romandie)

PostPosted: Fri Oct 11, 2019 2:03 pm    Post subject: [solved]trouble with mmap() shared mem Reply with quote

I am in the way to make ebuilds for the last dosemu2 git code and its depends. It work, but when running dosemu 2, it bail with:

Code:
Process 0 starting: F:\command.com /e:384 /k mmap(): Operation not permitted
ERROR: shared memory map failed, exiting


According to dosemu2 upstream, for shared mem support, I must mount tmpfs to /dev/shm. It is the case. I have nothing for that in /etc/fstab, but it is mounted and works fine with other software like jackd:

Code:
# mount
devtmpfs on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=469861,mode=755)
...
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)


# df -h
Filesystem      Size  Used Avail Use% Mounted on
...
devtmpfs         10M     0   10M   0% /dev
tmpfs           368M  1.1M  367M   1% /run
shm             1.8G  221M  1.6G  12% /dev/shm


# ls -1l /dev|grep shm
drwxrwxrwt 3 root root           320 Oct 11 13:37 shm


# ls -1l /dev/shm
total 80444
-rw------- 1 dom fvwm-crystal    65536 Oct 10 12:21 dosemu_dpmishm_11921_ldt_alias
-rw------- 1 dom fvwm-crystal    65536 Oct 11 13:11 dosemu_dpmishm_30378_ldt_alias
-rw------- 1 dom fvwm-crystal    65536 Oct 11 13:20 dosemu_dpmishm_32125_ldt_alias
-rw------- 1 dom fvwm-crystal    65536 Oct 11 12:36 dosemu_dpmishm_8249_ldt_alias
-rw------- 1 dom fvwm-crystal    65536 Oct 11 12:37 dosemu_dpmishm_8533_ldt_alias
-rw-r--r-- 1 dom fvwm-crystal 82280346 Oct 11 13:21 jack-1001-0
-rw-r--r-- 1 dom fvwm-crystal     1187 Oct 11 13:21 jack-1001-1
-rw-rw-rw- 1 dom fvwm-crystal    70744 Oct 10 12:08 jack-shm-registry
drwxr-x--- 2 dom fvwm-crystal      120 Oct 11 13:20 jack_db
srwxr-xr-x 1 dom fvwm-crystal        0 Oct 11 13:21 jack_default_1001_0
-rwxr-xr-x 1 dom fvwm-crystal       12 Oct 10 12:08 jack_sem.1001_default_a2j
-rwxr-xr-x 1 dom fvwm-crystal       12 Oct 11 13:21 jack_sem.1001_default_dbusapi
-rwxr-xr-x 1 dom fvwm-crystal 12 Oct 11 13:21 jack_sem.1001_default_freewheel
-rwxr-xr-x 1 dom fvwm-crystal 12 Oct 11 13:21 jack_sem.1001_default_system


command.com is installed into /opt because it is a binary package for now. To compile it would imply to succeed to install djgpp (a cross compiler for DOS), which have a completely mad build system from a package maintainer pov, and after that, to succeed to compile comcom32 into a way which is compatible with dosemu2. Upstream doesn't recommend doing this at all. Anyway, I have no working ebuild for djgpp at that time.

Also, into doesmu2 ebuild, it is
Code:
pax-mark -mr "${ED}/usr/bin/dosemu.bin"
. I think than, as I don't use an hardened setup, this will have no influence into my system.

Do you have any idea why dosemu2 fail to use that shared mem?


Last edited by Dominique_71 on Sat Oct 12, 2019 6:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1975
Location: Frankfurt, Germany

PostPosted: Fri Oct 11, 2019 2:12 pm    Post subject: Reply with quote

Google "command.com mmap(): Operation not permitted" returns:

Does any of those links contain the information you are looking for?
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1708
Location: Switzerland (Romandie)

PostPosted: Sat Oct 12, 2019 3:19 am    Post subject: Reply with quote

mike155 wrote:
Google "command.com mmap(): Operation not permitted" returns:
...
Does any of those links contain the information you are looking for?


Sure, thank your. I was searching for things like "dosemu mmap(): Operation not permited", which returned false clues because most results, if not all, was for an outdated version. That issue was triggered by the noexec flag on /dev/shm (kernel default which work with jackd and other software. In the maintime, dosemu2 upstream did a patch for dosemu2 to work both with exec and noxec on /dev/shm.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1975
Location: Frankfurt, Germany

PostPosted: Sat Oct 12, 2019 11:28 am    Post subject: Reply with quote

So is the issue solved? Or does it still persist?
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1708
Location: Switzerland (Romandie)

PostPosted: Sat Oct 12, 2019 6:09 pm    Post subject: Reply with quote

Yes, it is solved. I just changed the tittle.

The ebuilds needed to merge the last dosemu2 code will be made available soon. Hopefully into the linuxunderground overlay which can be installed via layman. It have already the last released dosemu2 version and a live ebuild, but this last one need updating to work well because it was a lot of changes into dosemu2 and its depends. If not possible, I will made them available on github in a few days, but they will not be in layman in that case.

EDIT: add 1 missing word.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum