MacOS 10.7.3 - mmap or shm_open is not available


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Does anyone have any pointers as to where I should be looking?

Hi Steven - First, the humor < xkcd: Pointers >.

Do “ipcs -a” to see how many shared memory attachments are in place.
You might see a lot, given that ‘shmat’ returns ‘too many files open’.
Here’s the BASH script I run, very often in my work right now, to try to
remove extraneous ones:

for tf in ipcs -m | sed -e 1d -e 2d -e 3d | awk '{print $2 }'; do
ipcrm -m $tf ;
done

If all else fails, reboot and see if that doesn’t take care of the
issue, at least for now. If the issue persists, it might be a new Lion
issue from 10.7.3; I know I’ve run GNU Radio in 10.7.[0-2]. I’ll
hopefully have a few spare cycles later this week to look into GNU Radio
on Lion. - MLD

On 9 Apr 2012, at 01:16, Michael D. wrote:

Does anyone have any pointers as to where I should be looking?

Hi Steven - First, the humor < xkcd: Pointers >.

I was waiting for something like that :o)

Do “ipcs -a” to see how many shared memory attachments are in place. You might
see a lot, given that ‘shmat’ returns ‘too many files open’. Here’s the BASH
script I run, very often in my work right now, to try to remove extraneous ones:

for tf in ipcs -m | sed -e 1d -e 2d -e 3d | awk '{print $2 }'; do
ipcrm -m $tf ;
done

I only seem to have one entry:

$ ipcs -a
IPC status from as of Mon Apr 9 11:03:42 BST 2012
T ID KEY MODE OWNER GROUP CREATOR CGROUP
CBYTES QNUM QBYTES LSPID LRPID STIME RTIME CTIME
Message Queues:

T ID KEY MODE OWNER GROUP CREATOR CGROUP
NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 262157 0x00000000 --rw------- steven staff steven staff
2 393216 2302 2120 19:39:30 20:03:03 19:39:30

T ID KEY MODE OWNER GROUP CREATOR CGROUP
NSEMS OTIME CTIME
Semaphores:

$ ipcrm -m 262157
ipcrm: shmid(262157): : Invalid argument

If all else fails, reboot and see if that doesn’t take care of the issue, at
least for now. If the issue persists, it might be a new Lion issue from 10.7.3; I
know I’ve run GNU Radio in 10.7.[0-2]. I’ll hopefully have a few spare cycles
later this week to look into GNU Radio on Lion. - MLD

I’ve already tried that, doesn’t seem to make any difference. I know of
at least one other person on 10.7.3 that is having this exact same
issue.

Cheers,

Steven.

Hmmph. Well, I bet Apple did something “clever” inside the Darwin
kernel that messed with shared memory in 10.7.3. There’s probably a
work-around too, but I have no idea what it might be right now since I’m
still using 10.6.8: it’s stable and works well for what I need right
now. I’ll look into this issue at the end of this week unless someone
else gets there first :slight_smile: - MLD

On Mon, Apr 9, 2012 at 8:13 AM, Michael D. [email protected]
wrote:

Hi Steven - First, the humor < xkcd: Pointers >.

I was waiting for something like that :o)

Steven,

Try to rebuild GNU Radio using -DTRY_SHM_VMCIRCBUF=Off.

After you rebuild it, make sure you remove
“~/.gnuradio/prefs/gr_vmcircbuf_default_factory” so you don’t confuse
the system.

We recently re-enabled this with cmake and it’s the default under
autotools. There’s a known bug in Cygwin, which was why this is an
option that can be set. As far as I know, it’s always worked under
OSX, but as Michael said, something might have changed and it’s just
been masked for a while. It’ll be interesting to know if this is a new
problem.

Tom


Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

On Mon, Apr 9, 2012 at 2:58 PM, Steven [email protected] wrote:

the system.

jbigkit jpeg lcms lcms2 libedit libffi libglade2 libiconv libidn libLASi
swig-python tcl texinfo tiff tk urw-fonts usrp wxWidgets-devel Xft2

Set your PYTHONPATH

make install
Thanks for the info. It’d be great to figure out where/why this is
going wrong. As I said, it used to be the default case under
autotools, and I don’t think we had a problem with it. If it’s a new
feature in OSX version x.y.z, then we’ll have to live with it until we
can figure out a workaround.

If no one can figure out how to get shared memory mapping to work,
we’ll add another check to disable it for both Windows and OSX.

Thanks,
Tom

Oh, glad to find out, someone else is having the same issue:

I’ve tried all proposed solutions, and nothing worked yet

marek_s:~ marek_s $ ipcs -m
IPC status from as of Thu May 10 13:13:27 CEST 2012
T ID KEY MODE OWNER GROUP
Shared Memory:
m 65536 0x00000000 --rw------- marek_s staff

Memory segment with key being null 0x00000000

Neither IPCRM or shmctl(id, IPC_RMID … ) worked. This issue came from
another program, so it’s definitely an system issue in 10.7.3 (11D50,
Darwin 11.3.0)

Now I’m upgrading to 10.7.4, so I hope this will fix the issue asap.
I’ll let you know