You are not logged in.

#1 2015-09-22 19:37:32

KenMacD
Member
Registered: 2014-01-06
Posts: 21

pycharm shared memory segments

Hello,

I'm running PyCharm, and every time I run py.test tests my # of shared memory segments increases. Eventually I'm unable to run any tests that use Postgres because it can't get any shared memory. I can increase kernel.shmmni to get it to work again for a while, but it's just temporary.

This is an example of one of the lines from the

ipcs -m

:

key        shmid      owner      perms      bytes      nattch     status
0x00000000 671220901  kenny      600        144256     1          dest

I ran an strace of the entire process and it shows that the process that did the shmget() on this block is 4 clone()s away from the original process, and no longer exists.

The strace of that process around that memory:

shmget(IPC_PRIVATE, 144256, IPC_CREAT|0600) = 671220901
shmat(671220901, 0, 0)                  = 0x7f1f495dd000
poll([{fd=44, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=44, revents=POLLOUT}])
writev(44, [{"+\2\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
poll([{fd=44, events=POLLIN}], 1, 4294967295) = 1 ([{fd=44, revents=POLLIN}])
recvmsg(44, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0011@\0\0\0\0\t\0`\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(44, 0x7f1f117240c0, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(44, 0x7f1f117240c0, 0)          = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=44, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=44, revents=POLLOUT}])
writev(44, [{"\202\1\4\0\0\5 \4\245\4\2(\0\0 \4+\2\1\0", 20}, {NULL, 0}, {"", 0}], 3) = 20
poll([{fd=44, events=POLLIN}], 1, 4294967295) = 1 ([{fd=44, revents=POLLIN}])
recvmsg(44, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0013@\0\0\0\0\t\0`\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(44, 0x7f1f117240c0, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(44, 0x7f1f117240c0, 0)          = -1 EAGAIN (Resource temporarily unavailable)
shmctl(671220901, IPC_RMID, 0)          = 0
shmdt(0x7f1f495dd000)

I looked for this map in proc/*/maps and I only see it in one place:

1190/maps:7f4eef55d000-7f4eef581000 rw-s 00000000 00:05 671220901                  /SYSV00000000 (deleted)

This pid is the Xorg process.

All the entries will disappear if I restart pycharm.

Any ideas?

Offline

Board footer

Powered by FluxBB