Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-08-22 Thread mvordeme


This seems to very random. For weeks and months, the socket count
remains stable, and then suddenly, the server is stuck and needs to be
restarted.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-29 Thread mvordeme


1000 sockets in two months would have been more than 15 sockets per day,
but right now, everything is quiet. The LMS has 39 open file handles in
total, of which 15 are sockets. That number has increased by one since I
am watching it (which was before I started logging).



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-27 Thread philippe_44


mvordeme wrote: 
> I've switched on debug logging for slimproto. It generates quite a lot
> of data.

Inded, but I should have said that "info" is good enough



LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch,
1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW,
2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,  Yamaha
WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-26 Thread philippe_44


mvordeme wrote: 
> Actually not. Originally, we used to shut down our WiFi overnight, but
> since our daughter has been on an unpredictable time schedule for a few
> months, we leave it up 24/7. I mean, now and then a player loses the
> connection, but I'd be surprised if it should happen frequently enough
> to explain this many open sockets.
> 
> There is something else that might be related. When you pause a track on
> Tidal, the URL will only continue to work for some time. If you wait for
> too long and try to resume, there is some kind of error message, and the
> next track is played. But even that does not happen frequently enough.
> Is there any kind of logging I can activate which could help?

But 2 month is a long time. You can try slimproto log to see
connections/disconnections



LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch,
1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW,
2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,  Yamaha
WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-26 Thread mvordeme


Actually not. Originally, we used to shut down our WiFi overnight, but
since our daughter has been on an unpredictable time schedule for a few
months, we leave it up 24/7. I mean, now and then a player loses the
connection, but I'd be surprised if it should happen frequently enough
to explain this many open sockets.

There is something else that might be related. When you pause a track on
Tidal, the URL will only continue to work for some time. If you wait for
too long and try to resume, there is some kind of error message, and the
next track is played. But even that does not happen frequently enough.
Is there any kind of logging I can activate which could help?



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-26 Thread philippe_44


I think I've founded the reason why. Do you run any of my bridge that
might loose connection/reconnect regularly? See
https://github.com/Logitech/slimserver/pull/625



LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch,
1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW,
2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,  Yamaha
WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-24 Thread philippe_44


mvordeme wrote: 
> Today, the LMS ran out of file handles again, but this time, they were
> all sockets. It had been running for 2 months.

There is an issue with cli_sockets when players are disappearing/coming
back. I've not been able to figure it out yet



LMS 8.2 on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet, 1xTouch,
1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW,
2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,  Yamaha
WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-06-22 Thread mvordeme


Today, the LMS ran out of file handles again, but this time, they were
all sockets. It had been running for 2 months.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-04-17 Thread mvordeme


Here is the list. They all belonged to the user tc with access mode 600:
Code:

~$ find /tmp -type f -maxdepth 1 -user tc -perm 600
  tc@piCoreServer:~$ find /tmp -type f -maxdepth 1 -user tc -perm 600
  AUi4vaEOf9
  jgDv0YCpyz
  dukSVaJOYO
  Yu5XG1ABnC
  hdElUQPHie
  gBLRAAPa8j
  rMAaXoyfO7
  d7zFvaiRIE
  2n11sGyGoA
  fKc5h2Lr3z
  2neRVkttoG
  vFw3GS1Afs
  h4YoUMhqBH
  C4NQw4CVge
  s9RQkAyJFT
  UtMkWjIqxS
  TFnagYgb3e
  Lc9C3GAH2o
  kp2OOKiblZ
  oZN1kNwf7P
  vOlyVbQ3ho
  Uv0vSJRB24
  9tPSiKjHN0
  2WUBuM87bS
  BAbglNWrsu
  EzcUziPYlv
  UY4O6d1pPx
  DmKoaTJsMV
  C2srNCn3Bj
  TkZXeBVgYp
  vmZZWzv4ci
  xBNog1WzEE
  ihNCypc3cU
  8Wi3lYFUxl
  LDfs4wPzoj
  peP0EHVwWj
  7bsy24tBCq
  QYNa2QYFnz
  dlClDV2sQS
  jDlqqbOb47
  8csFRMWZwH
  CVSj7XqC41
  UIp0FF6P9f
  06AYDdiyO3
  KdV6yOLU6h
  9Ey3KzuF4B
  8PRSUorQ5i
  ltWlpaIxBp
  OLQ9X2SGBY
  6Z0zE147Zg
  1Ll606oKQG
  zRDHwdT8XI
  Og74pAoCFm
  tjJRtu03fP
  utfHRjEOO0
  HIhdbOAbBf
  kfpGHb41Vq
  1moyFeidMU
  uxemVGJXsm
  Ovy19MlWE7
  nhyRft4ex4
  yW6fJzXBYJ
  mkdeFXdUAD
  mYHgdciU53
  PSKmjGtzSh
  3gCkB0RvMr
  n5EOw0hlop
  wDWzSYACsC
  Os2uVBhYka
  R30opE8zJy
  ZZxMDfnqU2
  BFvuYu3kQ1
  gw3kvhrtfK
  uxZdHuuxp1
  OAjQzMlnpH
  mhHufifuIm
  vNQ4SdxClI
  HGRzoQSPoO
  LtOaYTZhOE
  qY6IQwmWzh
  LjA8VPB4ri
  jsKYaqS5I1
  yD4YHyD7U8
  qETlXasQGz
  PzW5mYMWMo
  P4KL85n98D
  ACy0EdPuTz
  v2wCFXaHWJ
  DTu2b8XMWB
  qSPig7f7NJ
  cuJwjUafNr
  dVT1Rg3LEt
  EnRE7pyVX0
  zfuQVnZ8on
  uccSEOO6Of
  LlA4bZQ0YE
  Xpx0Sh5TpE
  7FzqS7Zf8U
  TtFNTTeb9A
  7NFk1pgbhO
  egSPN5etLt
  G5D6194Bhw
  ds141MxEF9
  rdCXQIvb9T
  geerOaC4TK
  t8wGal0nyA
  tdvN8mYbUg
  SN7rYaCkUx
  dtPj1bLhnJ
  7LtEr8EWg0
  Ia8kRt6eK7
  0F2S9WHqWG
  DFvSBrdAIZ
  jZ7JiHbjj1
  ZcxLphxGXd
  pBHX93vpCj
  jYNQoR5Tad
  Wp744OU8fr
  cFjLCFW9UM
  WkvJ3MXuyy
  fzRg2iyX4q
  qUXQM8hkyx
  9EeFlQaxYO
  x4pjNJh8ns
  DpZBUnMBPL
  2JJ6vG8Rj9
  oev50JJi6T
  I2wXmlJSf3
  blFzS8mBFC
  7YOmCEstPh
  PyZyhjYiHc
  BKjb6kgB8g
  hwy18dQnJ2
  Ne0qvjnQSx
  mieHCjGw1a
  LoMLHoptSa
  uDxcCHB6ub
  tTf0SBF5rD
  b3wBykc3hu
  p0tZA4PvR3
  TZRsw3Y6Em
  d4dMn5wlJr
  T8ja7v3Oia
  wnSWke4aE6
  GRjVr3H05Z
  6WZQAbapHk
  8zzHLULaPB
  sRSo7TGTMm
  3s7v7W7Eyg
  yqUD360r6N
  bW4gWCoyMB
  ApJNszXI0o
  7TPw5K3Qo3
  m9RGJZENzQ
  NaGQfUWejS
  bxLb71t5Ja
  uOr4MeLtbT
  SYimxiD9FI
  mdM4P4gXhd
  V7ugZkbbP6
  xa1Qicb730
  WrZKqlS0Ck
  e2oYUuwlVu
  JYEWeZIV07
  M99ClpbaPf
  LetvCpGrgj
  f6NfGvfR2W
  qAXYRCAfR3
  HVSgPxtRyx
  OmSyvFr64v
  O7ZPxfsND5
  2GHJKRPJH7
  PXDucYbjeH
  dPpKxt72gQ
  3jXqdZ4b0J
  fmTSTcEsI6
  5sKBjuKLWN
  ylMiREJqlB
  cLa33T5Apg
  OZtsW4duYE
  oVAKHxSIvL
  uIxO4BRvOX
  KXKpRZ2qrG
  lHgmVBLmdI
  HJiVKJWJeR
  2SxJr3KVfA
  9J8StDluYg
  6uJawzK6EA
  BGwcjZkgcb
  i46QgYNjZf
  rKRqzmNAnD
  patpQx0S77
  VqSuW8q63R
  OtnoRIvfIB
  HUTP6LpoZF
  oPicUlIxns
  b4wxLDJg3H
  dp1xCD9RUK
  iQpMCFIi7v
  vIyp53luQB
  nCGTSKRjFs
  R7fDc27fte
  mzmjEkNDHj
  NPGOO4ZjYK
  ThY97BETzU
  TKN08r1BDn
  kkOkcxZGCE
  flNaF3eQwQ
  P3HHFD9Mys
  XTu25laida
  LbRcnAhK53
  Y8HBVgUmRr
  p7HqpyvXyq
  EIcoZONP6S
  3PignNR5QQ
  qyTHYbObtN
  FpUCxO1bxZ
  fuft6rnEUX
  Vgp0sXPQcu
  zMA1anhoMF
  aZ6HISbmj0
  0Jo8lfEosk
  6fIVmzNcQD
  krl0kBAUoR
  Uf14rsV3ke
  wCgfV5XVhE
  vazf0uEtAM
  oTl6rgA5mZ
  Bwz2cOlmUZ
  qB9nxfTpFr
  3619dqC1WD
  VeDgCxtgsB
  Nza45koBZ0
  JYdwMWME6l
  Nd4IuvEi0Y
  ABdqI3Jxzl
  oUmr6buDCo
  rFRzY6laZ4
  jV7R3Bw8j7
  lnGOu6zkvt
  jYdgcyZG1g
  FbOVuJrBOf
  a32whjRqAD
  LfonJW9SPX
  AT1yVEQxqg
  lpeS6U4pIA
  tRDSN6T5XQ
  DXNzQlgUaO
  uo4UDRtET7
  KSDO7Y0Hb0
  kmfuo437jT
  G83UWrd2eM
  4YKzSx99e6
  2oTNXa8x9a
  OluTCwBKga
  N32pzcfyLR
  68V20hMAuv
  QB465fS5vd
  AbPkNa6O8u
  CadKkYP8pn
  i5GY4sKJP6
  9UZJuFYTBc
  Gq7UzCOGkF
  n2JyTY95oE
  0aI88t3sKX
  bLQqKxL4ZT
  sHfKnynukU
  K8owfquCUt
  XMGJNNZei4
  8IyaO1B3oh
  rdfCjZL5BW
  6VxstFb6yB
  GXEs2LTMTP
  IK1bbRCDVg
  p5wirKx4TA
  5fehrUu47A
  gcZGczbrmc
  NR6GA2GHhs
  suUp83GFhg
  NANNYek1l8
  ZE1ntIQODe
  GcHAE7rtbk
  6s0UOWYuWl
  yOngBZsfhX
  D3zm3Ibswr
  cYbTZ3KAGG
  uCgUih1aKB
  Sj9eliV3f7
  OYjZA1OyPQ
  pWw6PDv75N
  xvUuz8SQD1
  WfFLuBW1eI
  WCX8PObjqp
  BZ72LwnwJJ
  RLSUhOf6Du
  dFSLLM6MHY
  bN38Ma4XqM
  WuA7IodBct
  liA6y1Ksp2
  29Z0esLkoj
  UvOlUCzsXe
  xxm1DDbtOJ
  z6r8LtZzee
  YBsxCxyeCb
  g5QG9lB6hp
  Jrvulb13q1
  D8PfoYjNfX
  moLhHkiQJD
  solFYVuPI9
  TyzmNrowsv
  Slb3Inc6ng
  08HVaVnJ4Q
  bo96B7came
  oOBwXdsq8R
  Jc73g83TPf
  sUkhN0lueT
  bmgitA6UaD
  tq8IRw2llZ
  60TZiSAnpG
  KT82sHzglf
  93LuoaNJeM
  3PYXn4bqhT
  5QP4WivWuJ
  rXWUpOBjHy
  tDZq8ZRg05
  BFPDbIfHdz
  Euy8inaXGR
  EYSzpmtnVz
  rsrRvkzTnO
  FLjJaxm9Wq
  GIqUpac12u
  EVeFd1EgAn
  PxH57yADOa
  kpfYtG1cE4
  AtBsqrw9V7
  ulRUdOk7iI
  gLFCk7awFr
  tTzgFAXdcF
  AXpQaopkok
  JaikJY4OJB
  KGKWGuo5mu
  MpxZLffeIe
  teLs10Ag94
  PkcRWpfgvR
  xmfW6OyJ2n
  tZabuTo2Zp
  owLSAe0NGi
  1ricrF3nYf
  Uih7QWkAmg
  S3cy1ZhHqB
  ONWuxowmFA
  zT5VdyBgAZ
  YsoCC4zCHy
  mhldUl2vNC
  E48ovhnSHZ
  4UDDQdZPJP
  jlYsOuSsCA
  lfktyEDScd
  mTyMY5ZoOc
  qxPVkmW6Ux
  IXmDNVUByo
  oHAxqv59EG
  7T3q1NM05Y
  jaDDJEVjsZ
  WFTNc0cI5V
  E9GiLUIdFZ
  Q7dk7FVB3y

Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-04-17 Thread Michael Herger

This time, a large number of temp files had been left behind after I had
shut down the LMS.


Is there any pattern in those files? Size? Filename? File type?
___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-04-17 Thread mvordeme


This time, a large number of temp files had been left behind after I had
shut down the LMS.
Code:

~$ find /tmp -type f -maxdepth 1 -user tc -perm 600 | wc -l
  612




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-04-17 Thread mvordeme


Today, the server is dead again. The difference is that now, there are
no open file handles. Memory consumption is at 617 MB, and there are 958
temp files around:
Code:

Mem: 1911440K used, 42912K free, 127048K shrd, 5900K buff, 1157512K cached
  CPU:  0.2% usr  0.0% sys  0.0% nic 99.6% idle  0.0% io  0.0% irq  0.0% sirq
  Load average: 0.02 0.02 0.00 2/138 407
  PID  PPID USER STAT   VSZ %VSZ CPU %CPU COMMAND
  2706 1 tc   S 617m 32.3   0  0.2 {slimserver.pl} /usr/bin/perl 
/usr/local/slimserver/slimserver.pl --daemon
  
  ~$ sudo lsof -p 2706 | grep 2706 | cut -f 3 | grep /tmp/ | wc -l
  1
  ~$ find /tmp -type f -maxdepth 1 -user tc -perm 600 | wc -l
  958


The Transporter keeps switching off and on again and does not play a
single note. Since it lasted a little longer last time, I am going to
reboot the server itself.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-24 Thread mvordeme


I can confirm that no open file handles are left behind, only the number
of files in /tmp/ is growing. I'll keep an eye on the files and on the
memory consumption.
philippe_44 wrote: 
> I'm checking files with
> > 
Code:

  >   > 
  > lsof -r +D /tmp -a  -p your_pid
  > 

> > lsof on the BusyBox doesn't seem to care at all which options I supply.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-23 Thread mvordeme


I installed tonight's development build and will give it a spin. Thanks
a lot for your help.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-23 Thread philippe_44


See https://github.com/Logitech/slimserver/pull/553 if you want to give
it a try. I'm checking files with

Code:


  lsof +D /tmp -a  -p 80292
  


And I can confirm that nothing is left open with AAC and with FLAC files
are removed automatically. At exit, everything is cleaned up. I've not
verified that at very long term (500 or 2000 files) they start to be
removed one by one but I think they will be.



LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet,
1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,
Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-23 Thread philippe_44

philippe_44 wrote: 
> I do remember very well the discussion. I have made a few additional
> tests and in fact the DESTROY happens as expected when the cache is set
> to 10 but it need to be created with 10, not modified later at runtime
> as I was doing before. 
> 
> Still, that does not solve the issue of open handles. I guess we can
> tolerate a large number of files in temp, but we can’t have them opened.
> According to what I have read, File:.Temp unlinks the file when it is
> closed, so I would need to do something different like having a temp
> file that I only unlink in DESTROY but is closed unless the header is
> needed ... crap, that means I cannot rely on File:Temp for the random
> path/name generation and I need to memorize the name and reopen/close it
> all the time. I was hoping that the cache of $tracks would be
> decorrelated from playlist length and that LMS would re-read the ones
> that went out of LRU cache. Un

I know you don’t see edits so I’ll answer myself. It seems that the new
of File::Temp has an UNLINK option to prevent deletion on close. I’ve
looked at the code and it’s likely easy to to reopen/re-read the content
where I need it as it is very located in the code. 

So likely good news and à PR in the coming days



LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet,
1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,
Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-23 Thread philippe_44

mherger wrote: 
>  No, AFAIK, 500 is the number of cached tracks. After that, they
> should
>  be closed but I'm not sure that works as expected. I've reduced
> that to
>  10 and traced DESTROY it's very unclear to me when it happens,
> except
>  when you terminate the slimserver process. The code is in
>  /usr/share/perl5/Slim (from memory)
> 
> We discussed some concerns about this back on August 27 on Gitter. I'd 
> have loved to send you a link, but I didn't find a way to do so :-)

I do remember very well the discussion. I have made a few additional
tests and in fact the DESTROY happens as expected when the cache is set
to 10 but it need to be created with 10, not modified later at runtime
as I was doing before. 

Still, that does not solve the issue of open handles. I guess we can
tolerate a large number of files in temp, but we can’t have them opened.
According to what I have read, File:.Temp unlinks the file when it is
closed, so I would need to do something different like having a temp
file that I only unlink in DESTROY but is closed unless the header is
needed ... crap, that means I cannot rely on File:Temp for the random
path/name generation and I need to memorize the name and reopen/close it
all the time. I was hoping that the cache of $tracks would be
decorrelated from playlist length and that LMS would re-read the ones
that went out of LRU cache. Un



LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet,
1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,
Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-22 Thread Michael Herger

No, AFAIK, 500 is the number of cached tracks. After that, they should
be closed but I'm not sure that works as expected. I've reduced that to
10 and traced DESTROY it's very unclear to me when it happens, except
when you terminate the slimserver process. The code is in
/usr/share/perl5/Slim (from memory)


We discussed some concerns about this back on August 27 on Gitter. I'd 
have loved to send you a link, but I didn't find a way to do so :-)

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-22 Thread philippe_44


mvordeme wrote: 
> That is a fact which makes investigating the problem difficult. When
> there are 500 open file handles, it is difficult to keep track of what
> is happening.
> 
> I understand from the code that with a memory configuration of high, the
> process should not use up more than 500 MB of memory. Is that correct?

No, AFAIK, 500 is the number of cached tracks. After that, they should
be closed but I'm not sure that works as expected. I've reduced that to
10 and traced DESTROY it's very unclear to me when it happens, except
when you terminate the slimserver process. The code is in
/usr/share/perl5/Slim (from memory)



LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet,
1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,
Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-22 Thread mvordeme


That is a fact which makes investigating the problem difficult. When
there are 500 open file handles, it is difficult to keep track of what
is happening.

I understand from the code that with a memory configuration of high, the
process should not use up more than 500 MB of memory. Is that correct?



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-22 Thread philippe_44


mvordeme wrote: 
> I am not sure about all the debugging stuff, but it appears to me that
> it is not a matter of configuring things but of changing the code. I
> have tried to increase the amount of logging for a few items but didn't
> learn much. Where is all the code? The directory containing the
> slimserver.pl only contains 9 pl files in total, and only gdresize.pl
> uses File::Temp.> 
Code:

  >   > tc@piCoreServer:/tmp/tcloop/slimserver/usr/local/slimserver$ find . 
-name "*.pl" -print
  > ./CPAN/AnyEvent/Util/idna.pl
  > ./CPAN/AnyEvent/Util/uts46data.pl
  > ./CPAN/AnyEvent/constants.pl
  > ./CPAN/XML/SAX/placeholder.pl
  > ./cleanup.pl
  > ./gdresize.pl
  > ./gdresized.pl
  > ./scanner.pl
  > ./slimserver.pl

> > But I used the opportunity to update the LMS and watch a fresh system
> playing an album from Tidal. I now understood why just counting the
> number of open file handles does not help with understanding what is
> happening. Every track creates and destroys two sockets and two pipes,
> and there are other activities adding to the noise, like the caching
> of album art. But when it comes to temporary files, the behaviour is
> rather straightforward.
> 
> Every single track played leaves a temporary file behind with an open
> file handle in slimserver.pl. The files are rather uniform. They seem
> to contain mp4 metadata. I downloaded one of the mp4 tracks, too, and
> it looks nothing like those temporary files, although with binary
> data, this is hard to say. All temporary files start with binary data
> and end like this:> 
Code:

  >   > udtameta-hdlrmdirilst 
handlerilstr(meanorg.hydrogenaudio.replaygain_originator_codedata01101100i(meanorg.hydrogenaudio.replaygain!namereplaygain_track_gaindata-7.87
 dBi(meanorg.hydrogenauIuuidDLBY-METADATA-00meta3hdlrdlbtdolby tags 
handlerxml
  > 
  > 
  > 
  > 
  > 
LS1pbnB1dC1maWxlIDxhcmc+IC0tb3V0cHV0LWZpbGUgPGFyZz4gLS1hdWRpby1lbmNvZGVyIGFhYyAtLWF1ZGlvLWNici1yYXRlIDMyMCAtLWFhYy1tb2RlIGFhYyAtLWlucHV0LXNwZWVjaCBmYWxzZSAtLWF1ZGlvLW9ubHkgLS1yZXBsYXlnYWluIG9uIC0tYXVkaW8tcHJvcC1tZXRhIGxvdWRuZXNzIA==
  > 
  > 
  > 
  > a8d5be608e4aca0266c159418d806a4e
  > 
  > meta;hdlrdlbfdolby file metrics handlerqxml 
  > 
  > 
  > 
  > Dolby Media Generator 3.8.3
  > 2016-08-12T17:57:06
  > 115124
  > 
  > Dolby Pulse Encoder 1.1.4 sbr: 4.0 / Aug 18 2011
  > AAC
  > VBR
  > 32
  > 9765888
  > 1c5f05da944468156c140c483176ed9d
  > 
  > 44100
  > 2
  > None
  > 1600
  > 
  > 
  > 
  > 
  > 0f2340c558a9c8d72d0ce1fadcd2ff28
  > 
  > mmeta;hdlrdlbkdolby audio kernel handler 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 3c207014a46f955c7c617a330a9d1029
  > 
  > 3meta7hdlrdlbmdolby metadata handlerxml 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 36bbff96c50793db343f56cc653f0adb
  > 
  > )emdat

> > The only time I saw one of the files being removed was when my
> playlist contained only one track and I skipped forward, playing the
> same song again. Skipping backward leaves the existing file in place,
> and so does skipping forward to another track or the song ending on
> its own.

These temp files are the download of the header for remote files. They
should be closed/erased after 500 files (tbc) on large memory server. I
will revisit the code in the coming days.



LMS 8.1.x on Odroid-C4 - *SqueezeAMP!*, 5xRadio, 5xBoom, 2xDuet,
1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi,
Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-21 Thread mvordeme


I am not sure about all the debugging stuff, but it appears to me that
it is not a matter of configuring things but of changing the code. I
have tried to increase the amount of logging for a few items but didn't
learn much. Where is all the code? The directory containing the
slimserver.pl only contains 9 pl files in total, and only gdresize.pl
uses File::Temp.
Code:

tc@piCoreServer:/tmp/tcloop/slimserver/usr/local/slimserver$ find . -name 
"*.pl" -print
  ./CPAN/AnyEvent/Util/idna.pl
  ./CPAN/AnyEvent/Util/uts46data.pl
  ./CPAN/AnyEvent/constants.pl
  ./CPAN/XML/SAX/placeholder.pl
  ./cleanup.pl
  ./gdresize.pl
  ./gdresized.pl
  ./scanner.pl
  ./slimserver.pl

But I used the opportunity to update the LMS and watch a fresh system
playing an album from Tidal. I now understood why just counting the
number of open file handles does not help with understanding what is
happening. Every track creates and destroys two sockets and two pipes,
and there are other activities adding to the noise, like the caching of
album art. But when it comes to temporary files, the behaviour is rather
straightforward.

Every single track played leaves a temporary file behind with an open
file handle in slimserver.pl. The files are rather uniform. They seem to
contain mp4 metadata. I downloaded one of the mp4 tracks, too, and it
looks nothing like those temporary files, although with binary data,
this is hard to say. All temporary files start with binary data and end
like this:
Code:

udtameta-hdlrmdirilst 
handlerilstr(meanorg.hydrogenaudio.replaygainreplaygain_originator_codedata01101100i(meanorg.hydrogenaudio.replaygain!namereplaygain_track_gaindata-7.87
 dBi(meanorg.hydrogenauIuuidDLBY-METADATA-00meta3hdlrdlbtdolby 
tags handlerxml
  http://www.dolby.com/ns/mobile/protected-1.0;>
  
  http://www.dolby.com/ns/mobile/tags-1.0; 
id="febbcb871e10fe78fcb42572d432c797" read-only="true">
  
  
LS1pbnB1dC1maWxlIDxhcmc+IC0tb3V0cHV0LWZpbGUgPGFyZz4gLS1hdWRpby1lbmNvZGVyIGFhYyAtLWF1ZGlvLWNici1yYXRlIDMyMCAtLWFhYy1tb2RlIGFhYyAtLWlucHV0LXNwZWVjaCBmYWxzZSAtLWF1ZGlvLW9ubHkgLS1yZXBsYXlnYWluIG9uIC0tYXVkaW8tcHJvcC1tZXRhIGxvdWRuZXNzIA==
  
  
  
  a8d5be608e4aca0266c159418d806a4e
  
  meta;hdlrdlbfdolby file metrics handlerqxml 
  http://www.dolby.com/ns/mobile/protected-1.0;>
  
  http://www.dolby.com/ns/mobile/file-metrics-1.0; 
id="febbcb871e10fe78fcb42572d432c797">
  Dolby Media Generator 3.8.3
  2016-08-12T17:57:06
  115124
  
  Dolby Pulse Encoder 1.1.4 sbr: 4.0 / Aug 18 
2011
  AAC
  VBR
  32
  9765888
  1c5f05da944468156c140c483176ed9d
  
  44100
  2
  None
  1600
  
  
  
  
  0f2340c558a9c8d72d0ce1fadcd2ff28
  
  mmeta;hdlrdlbkdolby audio kernel handler 
  http://www.dolby.com/ns/mobile/protected-1.0;>
  
  http://www.dolby.com/ns/mobile/audio-kernel-1.0; 
id="febbcb871e10fe78fcb42572d432c797">
  
  
  
  
  
  
  
  
  3c207014a46f955c7c617a330a9d1029
  
  3meta7hdlrdlbmdolby metadata handlerxml 
  http://www.dolby.com/ns/mobile/protected-1.0;>
  
  http://www.dolby.com/ns/mobile/metadata-1.0; 
id="febbcb871e10fe78fcb42572d432c797">
  
  
  
  
  
  
  
  
  
  
  
  36bbff96c50793db343f56cc653f0adb
  
  )emdat

The only time I saw one of the files being removed was when my playlist
contained only one track and I skipped forward, playing the same song
again. Skipping backward leaves the existing file in place, and so does
skipping forward to another track or the song ending on its own.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-17 Thread bpa


mvordeme wrote: 
> I had found two different types of files, one of which had been
> identified somewhere above in the discussion. So far, I have not been
> able to actually see it happen. Every time I observe the system, all new
> file handles are closed again after a few minutes. I have been thinking
> about writing a little watch dog to alert me when it happens.

It was a good while back and I think it may be good to look again.  I
wonder whether the contents of the file somehow results in a scanning
error. 

For scanning streamed audio, the audio header (to be scanned) is saved
in a temporary file usually created using File::Temp->new() and it is
possible to do have better control over the temp file.

My initial idea would be to use TEMPLATE so that the name of the temp
file has additional info such as code module, streamname, format  etc. -
the "lsof" can then be used to see if any commonality in the files being
left open.  

It is also possible override auto deletion when the associated object is
destroyed so contents can be examined

The File::Temp also has its own debugging which can be enabled although
not sure what it produces - but ultimately it is the module which is
responsible for deleting the file.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-17 Thread mvordeme


I had found two different types of files, one of which had been
identified somewhere above in the discussion. So far, I have not been
able to actually see it happen. Every time I observe the system, all new
file handles are closed again after a few minutes. I have been thinking
about writing a little watch dog to alert me when it happens.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-17 Thread bpa


mvordeme wrote: 
> Now it is finally dead and does not play anything any more. The file
> handle count is up to 1024 and memory consumption is above 1 G.

If the files are the issue (or possibly a side effect of the issue -
objects not being garbage collected), then I think you have to find out
what's in the files and so get an indication of where they came from.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-03-17 Thread mvordeme


Now it is finally dead and does not play anything any more. The file
handle count is up to 1024 and memory consumption is above 1 G. The
system has almost no space for buffers any more. It already stopped
playing hi-res FLAC files weeks ago.
Code:

$ sudo lsof -p 32307 | grep 32307 | wc -l
  1024
  $ top
  Mem: 1903428K used, 50924K free, 106604K shrd, 10532K buff, 549776K cached
  CPU:  0.2% usr  0.0% sys  0.0% nic 99.7% idle  0.0% io  0.0% irq  0.0% sirq
  Load average: 0.31 0.19 0.08 3/138 21673
  PID  PPID USER STAT   VSZ %VSZ CPU %CPU COMMAND
  32307 1 tc   S1151m 60.2   0  0.2 {slimserver.pl} /usr/bin/perl 
/usr/local/slimserver/slimserver.pl --daemon

Going to restart ...



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-22 Thread mvordeme


Trying to find a pattern, but no success, so far. I thought that maybe
the mechanism of releasing the files is working in general but leaving
the odd file behind. In that case, must of those files should be rather
new. This doesn't seem to be the case.

Code:


  Date   | Count
  ---+--
  Jan 18 |  42
  Jan 22 |  29
  Jan 26 |  11
  Jan 27 |  29
  Jan 28 |  64
  Jan 29 |  50
  Jan 30 |  20
  Jan 31 |  17
  Feb 01 |  25
  Feb 02 |  12
  Feb 03 |  40
  Feb 05 |  12
  Feb 06 |  57
  Feb 07 |  13
  Feb 08 |  20
  Feb 09 |  20
  Feb 10 |   8
  Feb 11 |  19
  Feb 12 |   2
  Feb 13 |  37
  Feb 15 |  13
  Feb 16 |  30
  Feb 17 |   4
  Feb 18 |  38
  Feb 19 |  15
  Feb 21 |  13
  Feb 22 |  46
  ---+--
  Total  | 686
  




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-21 Thread mvordeme


Meanwhile, the LMS is using almost 800 M of memory. The process is
holding a total 696 of open file handles, of which 20 are sockets, 12
are files in /mnt/mmcblk0p2/tce/slimserver/Cache/ and 656 are files in
/tmp/. All these files do actually exist, and all existing temp files
seem to be associated with an open file handle.


Code:

Mem: 1820584K used, 133768K free, 102676K shrd, 21016K buff, 867764K cached
  CPU:  0.0% usr  0.0% sys  0.0% nic 99.8% idle  0.0% io  0.0% irq  0.0% sirq
  Load average: 0.00 0.03 0.02 2/137 23884
  PID  PPID USER STAT   VSZ %VSZ CPU %CPU COMMAND
  32307 1 tc   S 795m 41.6   0  0.1 {slimserver.pl} /usr/bin/perl 
/usr/local/slimserver/slimserver.pl --daemon --user tc --group staff
  
  $ sudo lsof -p 32307 | grep 32307 | wc -l
  696
  
  $ sudo lsof -p 32307 | grep 32307 | cut -f 3 | grep socket | wc -l
  20
  
  $ sudo lsof -p 32307 | grep 32307 | cut -f 3 | grep /slimserver/Cache/ | wc -l
  12
  
  $ sudo lsof -p 32307 | grep 32307 | cut -f 3 | grep /tmp/ | wc -l
  656




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread mvordeme


Seems that I need to get my head around that funny Perl syntax after
all. In the LMS settings, I can choose between normal, high and maximum
database size. It is set to "high" for machines with 1+ GB of memory,
which should be fine. 2 GB is a little too much.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread philippe_44


mvordeme wrote: 
> Loading this discussion with more stuff: The number of file handles on
> my Pi has now exceeded 500, memory is at 580 M. I'll keep an eye on it.
> (For the protocol: Today, I have been listening to Deezer Smart Radio
> for some time.)

Here is the code in charge of limits

Code:


  sub init {
$cache = Slim::Utils::Cache->new;
  
my $maxPlaylistLengthCB = sub {
my ($pref, $max) = @_;

if ($prefs->get('dbhighmem')) {
$max ||= 2000;
$max = 2000 if $max < 2000;
}
else {
$max ||= 500;
$max = 500 if $max > 500;
$max = 100 if $max < 100;
}
  
my $cacheObj = tied %Cache;
if ($cacheObj->max_size != $max) {
$cacheObj->max_size($max);
}
};

$maxPlaylistLengthCB->(undef, $prefs->get('maxPlaylistLength'));

$prefs->setChange($maxPlaylistLengthCB, 'maxPlaylistLength');
  }
  


So if you have set the "high memory usage" in LMS settings, it's 2000. I
did not remember that



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread mvordeme


Loading this discussion with more stuff: The number of file handles on
my Pi has now exceeded 500, memory is at 580 M. I'll keep an eye on it.
(For the protocol: Today, I have been listening to Deezer Smart Radio
for some time.)



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread Simonef


bpa wrote: 
> Great that you solved it. Even better that it was not something obvious.

I hope that the FreeBSD team will solve it quickly, because setting the
locale to C can cause problems with file names.
A huge thanks to everyone that helped me to figure it out.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread bpa


Simonef wrote: 
> Big News.
> Starting LMS with LC_ALL=C instead of LC_ALL=en_US=UTF-8 solves the
> bug.
> 
> My first reaction was "How the f a locale setting can cause a memory
> leak of 12GB in an OS used by servers (Netflix included as an
> example)??" Because this seems to be a bug of the OS and not of Perl
> itself.
> See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239520#c11

Great that you solved it. Even better that it was not something obvious.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread Simonef


philippe_44 wrote: 
> I re-read the pipeline code and I can only think that BSD screws up
> either with the reader/writer/source socket by not releasing buffer when
> using localhost sockets or in that code
> > 
Code:

  >   > 
  > if ($writelen) {
  > 
  > main::DEBUGLOG && $log->debug("Wrote $writelen bytes to 
pipeline writer");
  > 
  > if ($writelen != $pendingSize) {
  > ${*$self}{'pipeline_pending_bytes'} = 
substr($pendingBytes, $writelen);
  > ${*$self}{'pipeline_pending_size'}  = 
$pendingSize - $writelen;
  > }
  > else {
  > ${*$self}{'pipeline_pending_bytes'} = '';
  > ${*$self}{'pipeline_pending_size'}  = 0;
  > }
  > }
  > else {
  > 
  > ${*$self}{'pipeline_pending_bytes'} = $pendingBytes;
  > ${*$self}{'pipeline_pending_size'}  = $pendingSize;
  > 
  > if ($! != EWOULDBLOCK) {
  > return undef;   # reflect error to caller
  > }
  > 
  > last;
  > }
  > 

> > 
> The 'pipeline_pending_bytes' are not released either when being shrunk
> or re-assigned to the substr() of $pendingBytes. In any case,
> unfortunately, it looks like an obscure BSD+Perl issue that will be
> quasi-impossible to track w/o a full system and my FreeBSD VM is a
> real pain to use on VirtualBox as some of the drivers does not work
> well.
> 
> [edit]: Have you looked more broadly at BSD and Perl and Memory Leak?
> For example, https://github.com/Perl/perl5/issues/17105 talks about an
> issue with syslog. I'm not a real FreeBSD user, I just do quick
> verification when some of my apps are compiled for it.


Big News.
Starting LMS with LC_ALL=C instead of LC_ALL=en_US=UTF-8 solves the
bug.

My first reaction was "How the f a locale setting can cause a memory
leak of 12GB in an OS used by servers (Netflix included as an
example)??" Because this seems to be a bug of the OS and not of Perl
itself.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread Simonef


bpa wrote: 
> There have been user of LMS on FreeBSD system for a good while and
> transcoding is bound ot be used - yet I don't recall crash report.
> 
> Could it be that the behaviour (i.e. don't shrink memory allocation from
> "high water" mark is normal for FreeBSD) is normal FreeBSD and that
> perhaps FreeBSD does shrink it back if resources get stretched.  A bit
> like the 500 file handles issues just discussed.
> 
> @Simonef 
> Assuming this is not a LMS bug.
> What is the long term detrimental effect of large memory allocated to
> LMS - does system crash ?  
> What problem could arise with large memory allocated to LMS - do other
> processes fail to start ?

The process will fill all the RAM and then crash. The "long-term"
depends on the transcoding. In extreme cases it can take 2 hours to fill
12GB and then crash.


philippe_44 wrote: 
> I re-read the pipeline code and I can only think that BSD screws up
> either with the reader/writer/source socket by not releasing buffer when
> using localhost sockets or in that code
> > 
Code:

  >   > 
  > if ($writelen) {
  > 
  > main::DEBUGLOG && $log->debug("Wrote $writelen bytes to 
pipeline writer");
  > 
  > if ($writelen != $pendingSize) {
  > ${*$self}{'pipeline_pending_bytes'} = 
substr($pendingBytes, $writelen);
  > ${*$self}{'pipeline_pending_size'}  = 
$pendingSize - $writelen;
  > }
  > else {
  > ${*$self}{'pipeline_pending_bytes'} = '';
  > ${*$self}{'pipeline_pending_size'}  = 0;
  > }
  > }
  > else {
  > 
  > ${*$self}{'pipeline_pending_bytes'} = $pendingBytes;
  > ${*$self}{'pipeline_pending_size'}  = $pendingSize;
  > 
  > if ($! != EWOULDBLOCK) {
  > return undef;   # reflect error to caller
  > }
  > 
  > last;
  > }
  > 

> > 
> The 'pipeline_pending_bytes' are not released either when being shrunk
> or re-assigned to the substr() of $pendingBytes. In any case,
> unfortunately, it looks like an obscure BSD+Perl issue that will be
> quasi-impossible to track w/o a full system and my FreeBSD VM is a
> real pain to use on VirtualBox as some of the drivers does not work
> well.
> 
> [edit]: Have you looked more broadly at BSD and Perl and Memory Leak?
> For example, https://github.com/Perl/perl5/issues/17105 talks about an
> issue with syslog. I'm not a real FreeBSD user, I just do quick
> verification when some of my apps are compiled for it.

I'm gonna try the fix mentioned in the github issue you linked. If it
fail I'll setup a vm on my server and I'll send you  credentials. (I'm
unable to send you MP, don't know why, do you have an e-mail addr?)



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-08 Thread bpa


philippe_44 wrote: 
> The 'pipeline_pending_bytes' are not released either when being shrunk
> or re-assigned to the substr() of $pendingBytes. In any case,
> unfortunately, it looks like an obscure BSD+Perl issue that will be
> quasi-impossible to track w/o a full system and my FreeBSD VM is a real
> pain to use on VirtualBox as some of the drivers does not work well.

There have been user of LMS on FreeBSD system for a good while and
transcoding is bound ot be used - yet I don't recall crash report.

Could it be that the behaviour (i.e. don't shrink memory allocation from
"high water" mark is normal for FreeBSD) is normal FreeBSD and that
perhaps FreeBSD does shrink it back if resources get stretched.  A bit
like the 500 file handles issues just discussed.

@Simonef 
Assuming this is not a LMS bug.
What is the long term detrimental effect of large memory allocated to
LMS - does system crash ?  
What problem could arise with large memory allocated to LMS - do other
processes fail to start ?



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44


I re-read the pipeline code and I can only think that BSD screws up
either with the reader/writer/source socket by not releasing buffer when
using localhost sockets or in that code

Code:


if ($writelen) {
  
main::DEBUGLOG && $log->debug("Wrote $writelen bytes to 
pipeline writer");
  
if ($writelen != $pendingSize) {
${*$self}{'pipeline_pending_bytes'} = 
substr($pendingBytes, $writelen);
${*$self}{'pipeline_pending_size'}  = 
$pendingSize - $writelen;
}
else {
${*$self}{'pipeline_pending_bytes'} = '';
${*$self}{'pipeline_pending_size'}  = 0;
}
}
else {
  
${*$self}{'pipeline_pending_bytes'} = $pendingBytes;
${*$self}{'pipeline_pending_size'}  = $pendingSize;
  
if ($! != EWOULDBLOCK) {
return undef;   # reflect error to caller
}
  
last;
}
  


The 'pipeline_pending_bytes' are not released either when being shrunk
or re-assigned to the substr() of $pendingBytes. In any case,
unfortunately, it looks like an obscure BSD+Perl issue that will be
quasi-impossible to track w/o a full system and my FreeBSD VM is a real
pain to use on VirtualBox as some of the drivers does not work well.



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44


Maybe you could have a look at song.pm and pipeline.pm. I did that
yesterday but could not see anything that would trigger a question, but
more eyes always help



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44


mvordeme wrote: 
> I believe that if there really is an issue with file handles on my Pi,
> it is not the same that Simone has reported. My open file handles are
> back down to 459 and memory usage is up to 562 M. Since it looks like
> for every transcoded stream, a temp file is left over, but the number of
> file handles is not growing, I'll match the file handles against the
> temp files to get a better idea of what is happening.> 
Code:

  >   > -rw---1 tc   staff55228 Feb  7 18:16 JGCjBbgQxZ
  > -rw---1 tc   staff50248 Feb  7 18:21 lf2RyypjF9
  > -rw---1 tc   staff67636 Feb  7 18:26 nmAx4IIiMz
  > -rw---1 tc   staff56652 Feb  7 18:33 Ye36Wt7Hb9
  > -rw---1 tc   staff63348 Feb  7 18:38 pyqDc5YX93
  > -rw---1 tc   staff52628 Feb  7 18:44 qILjMvdIpF
  > -rw---1 tc   staff37944 Feb  7 18:49 gAd3wem95x
  > -rw---1 tc   staff64644 Feb  7 18:53 4gUg6Rf5Dw
  > -rw---1 tc   staff47828 Feb  7 18:59 xFbatEwmdC
  > -rw---1 tc   staff72140 Feb  7 19:03 B5DbNkB9Xe

> > 

Yep, LMS will close them after they have reached 500-ish. We discussed
having a different approach but that was not easy so we decided to wait
and see. Not having these files opened means most remote streaming will
not work anymore.



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44

mherger wrote: 
> > Files opened in /tmp are expected, this is the cache for scanning
> remote
> > tracks
> 
> I vaguely remember having discussed the risk of those filehandles in 
> your AAC seeking PR. Could there be an issue that sometimes we store a 
> reference to it outside the track object? Thus it doesn't get freed when
> 
> the track is destroyed?
> 
> That said, this doesn't really explain the claim that the memory usage 
> would increase massively with things like DSD.

I agree and I remember that very well. We can go back to this but I
don’t think this is the issue we are talking about as the ram
consumption seems purely correlated to transcoding



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


philippe_44 wrote: 
> Yes, the Max is set a 500 internallyOk, so file handles should be fine and 
> probably not related to the
growing memory consumption.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


I believe that if there really is an issue with file handles on my Pi,
it is not the same that Simone has reported. My open file handles are
back down to 459 and memory usage is up to 562 M. Since it looks like
for every transcoded stream, a temp file is left over, but the number of
file handles is not growing, I'll match the file handles against the
temp files to get a better idea of what is happening.
Code:

-rw---1 tc   staff55228 Feb  7 18:16 JGCjBbgQxZ
  -rw---1 tc   staff50248 Feb  7 18:21 lf2RyypjF9
  -rw---1 tc   staff67636 Feb  7 18:26 nmAx4IIiMz
  -rw---1 tc   staff56652 Feb  7 18:33 Ye36Wt7Hb9
  -rw---1 tc   staff63348 Feb  7 18:38 pyqDc5YX93
  -rw---1 tc   staff52628 Feb  7 18:44 qILjMvdIpF
  -rw---1 tc   staff37944 Feb  7 18:49 gAd3wem95x
  -rw---1 tc   staff64644 Feb  7 18:53 4gUg6Rf5Dw
  -rw---1 tc   staff47828 Feb  7 18:59 xFbatEwmdC
  -rw---1 tc   staff72140 Feb  7 19:03 B5DbNkB9Xe




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44


mvordeme wrote: 
> But 450? And all of them are still open in LMS.
> 
> Files containing binary data only seem to end like this:> 
Code:

  >   > 
TsgpdrollsbgprollEbudtaZmeta!hdlrmdirappl-ilst%toodataLavf58.20.10freeZMmdat

> > 

Yes, the Max is set a 500 internally



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


Simonef wrote: 
> As already stated before:
> 4 local flacs (random)
> No plugin involved.
> With every kind of audio processing, sox, FLAC, lame. 
> This does not happen only if there Is no transcoding involved.

If this issue happens with any use of pipelining then I think there
would be many more reports.

I think this may be a FreeBSD issue and not a Linux one - I can't see
the post where a Linux user has this same issue.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Simonef


mherger wrote: 
> > I tried the command and played 4 tracks (with transcoding)
> 
> What kind of tracks? And what kind of transcodings are involved? Are you
> 
> using any kind of 3rd party plugin which is involved in the transcoding
> 
> process? If so: can you reproduce the issue after remvoving it, only 
> using default transcoding pipelines?

As already stated before:
4 local flacs (random)
No plugin involved.
With every kind of audio processing, sox, FLAC, lame. 
This does not happen only if there Is no transcoding involved.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Michael Herger

I tried the command and played 4 tracks (with transcoding)


What kind of tracks? And what kind of transcodings are involved? Are you 
using any kind of 3rd party plugin which is involved in the transcoding 
process? If so: can you reproduce the issue after remvoving it, only 
using default transcoding pipelines?

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Michael Herger

Files opened in /tmp are expected, this is the cache for scanning remote
tracks


I vaguely remember having discussed the risk of those filehandles in 
your AAC seeking PR. Could there be an issue that sometimes we store a 
reference to it outside the track object? Thus it doesn't get freed when 
the track is destroyed?


That said, this doesn't really explain the claim that the memory usage 
would increase massively with things like DSD.

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


bpa wrote: 
> This looks like MPEG4 header - I recognise the udta and mdat
> 
> IIRC  LMS reads the start (e.g. x number of bytes)of the files/stream 
> (maybe into a temp file) before it can tell a player to stream.

In Slim::Utils::Scanner:Remote.pm - the routine streamAudioData - reads
128*1024 bytes into a Temp file.

How big are these temp files ?



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Simonef


bpa wrote: 
> There is buffering of data withing LMS and so file compression will
> affect how much is buffered.  A lot of buffering is associated with a
> file handle.
> Perl will only garbage collect resources associated with a file handle
> when it is closed and no longer in use.
> 
> As a sanity check, you can check whether number of handles increases
> after playing a pipeline process started/finished with something like 
> lsof -p  | wc -l

I tried the command and played 4 tracks (with transcoding)

The result of lsof is stable at 42 both before playing the tracks and
when I stopped the playing. But after 4 tracks RAM usage went from 180MB
to 760MB



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


mvordeme wrote: 
> But 450? And all of them are still open in LMS.
> 
> Files containing binary data only seem to end like this:> 
Code:

  >   > 
TsgpdrollsbgprollEbudtaZmeta!hdlrmdirappl-ilst%toodataLavf58.20.10freeZMmdat

> > 

This looks like MPEG4 header - I recognise the udta and mdat



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


But 450? And all of them are still open in LMS.

Files containing binary data only seem to end like this:
Code:


TsgpdrollsbgprollEbudtaZmeta!hdlrmdirappl-ilst%toodataLavf58.20.10freeZMmdat




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread philippe_44


Files opened in /tmp are expected, this is the cache for scanning remote
tracks



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


I am only using Tidal. My wife is listening to web radio, but since it
doesn't require transcoding, I don't expect it to leave temp files
behind.

I just had a quick look at a few of those files. They contain mainly
binary data. Some of them end with XML like this:
Code:

http://www.dolby.com/ns/mobile/protected-1.0;>
  
  http://www.dolby.com/ns/mobile/metadata-1.0; 
id="ec35e13380fae679f72ad77da14ad998">
  
  
  
  
  
  
  
  
  
  
  
  da4947e91ab7a7bb034d2396091e47d6
  




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


I am not entirely sure what happened just now. The track I was playing
was cut short by maybe half a minute and the next track started. The
number of file handles went up by another 4 and after some time went
down by 1. Also at the moment, the contents of /proc/32307/fd and the
output of lsof don't tie up. There is a difference of 1. I just played
the same track again, but this time, nothing out of the ordinary
happened.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Michael Herger

The majority of these file handles point to temp files most of which are
less than 100 k in size:


Could you peek into some of them to try to understand what they are? 
What music service(s) would you be using? I've seen reports about Spotty 
writing to /tmp (which I thought I did fix already...).


___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread mvordeme


On my Pi, the number of file handles goes up by 4 when starting playback
and immediately drops again when playback stops. This appears to be good
news at first sight, but nevertheless, the LMS process has piled up the
impressive number of 459 open file handles in the last 21 days:
Code:

tc@piCoreServer:~$ sudo ls -l /proc/32307/fd | wc -l
  459

The majority of these file handles point to temp files most of which are
less than 100 k in size:
Code:

tc@piCoreServer:~$ ls /tmp
  03cIFl7jwe 4rgI1aC5vc 9WJ4VtXcBL Gd9RHv3V1l NNPPF9ceUe 
Sl3yuXOz36 WuykGpS0xb bootlog.txtgKm8BgSzot mEQGU5SvOW 
rJkQlGJI8J wURF2K4f4K
  0EmYhzJcmB 4tPPr4daxA 9kOwuZh3DW GmabeY5h3Q NTlU4uMxZo 
SsEtswHHAn WvCIsttz5m bzMqfrLxAV guEXqhnCGq mEp9BbzIyb 
rukbirJ2Vm wVhM2nDcQZ
  0MgKy2CQgv 59OZNn7TZC 9ncQsIcC0T GvYFsnRz12 NZbdlVfobT 
Ssa2ci4XIw X6zZ6QDze7 c40jEOE2px hC1zbMSwlZ mLpFKaW1yL 
s4ESx3Ymud wWXbsZiJ20
  0OdWqmUZXu 5EoPV3jX4t 9tzReGrzMm Hg1rwaMJQU Nb5kHNTXVK 
Sw1eZQg04O X94BfSP5gY c5kBHVyR90 hDFoTS1pt6 mcXUl3DsXH 
s4bQXZPW1N wXr80U6zsv
  0VW1ORXGi8 5qtZGav2wm 9yDdWrfNFh HhKv5L1ozW NruzzJs1Um 
T0bBX5nUIx XCechksfUu cGaSipwMqP hSqo7SFjnL mqRSCx1FIO 
s82mYev8qQ wfqSFmkCa1
  0iNoW2Ico0 5yi4EhKHHS A1tbR1pg34 HrjcbeYad8 Nx1pQGNdGk 
TBm6dOTIVO XUWUuZNkeL cICQETUXgO hWNDmZBFYx mu37x9zwHD 
sXJC56fXBc wiVr3HQwPk
  0qKNEliEkl 604D2xW2Tt AaEYtvzAMB I0e7fkV9G6 O1VvyykKyv 
TGqW8Fs3OL XYU2njU0e6 cJEPfJnxFE hXwNydIFSS mzjDdGcRJq 
se46Pf42uA wk6oxnHMKn
  0qkNkqI35F 6Qy9fMg2Wt AnKjz3mGy7 I5w5mUr4hw O5s04ZhuvZ 
TJ6RyApBlL Xbz31gOGIm cPzStqDQB0 hZjRd9lF00 n9YIrXeYHw 
sexeF2VROx wmbL4CgCXb
  0unQjsdhxT 6WGXas0JgF B4TYWqilnd IDXJgiVJru OHpas4VD1J 
TOKksgRTmD Xc2vhUjjtq d3MNPBgpyP i3HwB8XJbA nDNobIBN6U 
sjDEsb8NSk wtlFddVnSf
  1BVOZ2XO58 6lpc5Hz72e BILAwoAQbV IEGu7ZTHcx OLYrBtXlhm 
TTFITP0uvW XgGRJL9V1d d8buGmkIb5 iFWF8Ir4LQ nEye6aNZOU 
slimupdate/x13y3rNG7X
  1CYPNL0GEs 6t7NbOMLiX BMDe4xvaVY IFecwjVZY5 Opo6TN3ru2 
TkciUsvxFT XhuxXEX9DA dAWhKbIZ6z iJECPb3BTR nOtq4bk4Qh 
tELx8hMxrY x1zuzXUY2r
  1CcvD9Vpbe 728rEKvRdx BYU8sN2gql IncXP37qXU P8C7rfNVlB 
TrqyHlAjDw Y9xRrqrDmI dCg2gXtpFQ iMLfib0C6P nbWRfHPoLK 
tRsPc4VdpT xB0IEgJfWR
  1ZdVNpxEu7 7ACuIcyWP4 Bm4cXyA9bR J8am7gmDWf PQJ952a5q3 
TuPUuLqapg YAtTtPXVkP dEIUtc7xxw ibPwSyx1K9 newdep.lst 
tbqL2ZYEXL xQLtqB6sbI
  1fgdvPmnPZ 7Ew8nXotOR C68HQ4pbMd JFQ0d7rW6d PuM3rncSUe 
Tx6gd5AP7T YHuLaKQFi4 dLDfu8zfTw ilrsdprSUK nnbwLlRdME tce/ 
  xRhfBKPNCx
  1u0GHEQlQF 7GjOSv0tJO CpXr0PDULX JNdNFhsdXQ Q0YZtnyi9g 
U40bI0bgVI YSky3P8lHb dUxnq7qLUV imVlF508C0 nsC9mU2Z5T 
tcloop/xXkR2lIbYb
  1yzJMX1dVk 7IAD7vYZwS Crr4Gv0bnD JPocnZeLJh Q97QZVUPHQ 
UFzbJURWJF YtQah9muru dbJk6RXBV2 immrxdWS9t o6E0LBA07F 
tmp.18jhiN xdx5D2lUAN
  2HvwYk8MCS 7LbsrebwUg CtwXSukPiM JRs60MDOCL QOnb4i0ybg 
UNlImZPzrj Z96bAqmu7Q dg8AR3wXax ioow0K9ArG oDxX0roKmb 
txlHsN7Ijm xtMRobN8ZJ
  2IApNBY1rq 7PIGNDgs66 D2uONQqI2k JYMzKBOFSM QTFc97PBBz 
UNqy2QUrnY ZHmfPq3ITY diOtzoNgJq isfSzmLrsz oIUhnZISSg 
tzxEDKuYOV xwAC0YWWr2
  2lCmLwhhGv 7XKgKqCN2Z DY5QcaTz3J JnWccflg20 QX1iu33p5W 
UV8Dzkx8uc ZkEdWmhrc9 drGnCSBfBF ivnGZEP7vN oKSRjJA6lf 
u4JRuoOqI5 y6E4lbOjSE
  2oes0nmgVo 7aDVmWnkwu DaPdB5GQM1 KJEAgBLkf0 QY1dJvGXwn 
UYqCoex4kG ZqBCgbHQ2p dropdown.cfg   j8a8PPWvIk oSn9W4XjQA 
u6FBVMX2C1 y8qvpiMYND
  2xcEfyp1UU 7bngchDriJ DkbfceTQ53 KRrBENMk9r Qfj1r76VGo 
UlJtjVsZce aAMbKfWFTo dydAPGv4Eh jDQaSysY9E oY200lYF9W 
u8Srsfdus6 yOwD1uPuhw
  2zHo8AiIxo 7nIYfS249w DyuMagCTKO KhqHd5Imgy Qw8HVLPpBz 
UqLr4FTo6Y aGWnkQ8rRO e8Jj1hBYTg jrMvLCp6Y2 obD9xsa12h 
uEu4LwesSC yvejTHwJwv
  30qVkfd0E0 7o0j1wo3EH E2TmgSf2yj KopDpxPt26 QwYuUAcMkt 
UrQdjwuHh9 aICyozsrVW eBYXtBpFPX jweUwdH9vl oguOUERzTo 
uZylAdOAsy zF8nHZGfdB
  3FWr84IAx5 7r4nKLNbTQ E7xMHcGN0Q Kvh3rpbiHJ R5nbmn9QkS 
UvTqndB2gz aJk8YEA6xo eDwJDhTjWB k0LklNxGhi orhHMGKcRn 
udDXmQlJQg zkbUlGLixc
  3R5hP9Elsv 82PD3FRdpU EAxn3QNhDo L1Xbiu6N55 RBWQ0Nwyyr 
UzpMA1Zkso aJtJaXx4wr eHzILmDRip 

Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


bpa wrote: 
> As a sanity check, you can check whether number of handles increases
> after playing a pipeline process started/finished with something like 
> lsof -p  | wc -l

As a reference,I did a quick test playing a file to a player and it is
the only activity on LMS.

File handles go up by 4 when playing.
Drop by 2 when track is stopped.
After about a minute drops by another 2 to original value.



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


Simonef wrote: 
> . While the transcoding software used (sox, flac lame or whatever)
> is always correctly closed, the size of slimserver.pl grows A LOT and
> the ram usage of slimserver.pl never goes down.
> So I'm pretty sure that it's leaving some handles/objects around open.
> And there is also a correlation that let me think this is the case: when
> transcoding a small file (mp3) che ram usage grows slowly, when
> transcoding a huge file (32/384k or DSD) the RAM usage grows extremely
> fast.
> 
> But while I'm a dev, I'm not familiar at all with both perl (never used
> it) and how lms manages pipelining, so the only thing I can do is
> testing and reporting :/

There is buffering of data withing LMS and so file compression will
affect how much is buffered.  A lot of buffering is associated with a
file handle.
Perl will only garbage collect resources associated with a file handle
when it is closed and no longer in use.

As a sanity check, you can check whether number of handles increases
after playing a pipeline process started/finished with something like 
lsof -p  | wc -l



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Simonef


bpa wrote: 
> A long time ago, on some Linux distros, there was a problem with
> pipelining when the transcoding process would not shut down properly and
> become a zombie - this would mean many resources in LMS would not be
> released as handles were not closed etc.
> 
> It is a wild shot but are there any zombie processes or any indication
> that pipelining is leaving handles open  or no. increasing ?

. While the transcoding software used (sox, flac lame or whatever)
is always correctly closed, the size of slimserver.pl grows A LOT and
the ram usage of slimserver.pl never goes down.
So I'm pretty sure that it's leaving some handles/objects around open.
And there is also a correlation that let me think this is the case: when
transcoding a small file (mp3) che ram usage grows slowly, when
transcoding a huge file (32/384k or DSD) the RAM usage grows extremely
fast.

But while I'm a dev, I'm not familiar at all with both perl (never used
it) and how lms manages pipelining, so the only thing I can do is
testing and reporting :/



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


Simonef wrote: 
> The memory leak is present on *BSD. And it seems also of linux arm
> platforms (as said by another user)
> I've NOT experienced this bug in debian x64


A long time ago, on some Linux distros, there was a problem with
pipelining when the transcoding process would not shut down properly and
become a zombie - this would mean many resources in LMS would not be
released as handles were not closed etc.

It is a wild shot but are there any zombie processes or any indication
that pipelining is leaving handles open  or no. increasing ?



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Simonef


bpa wrote: 
> I got a little lost on platforms being used. 
> Your initial report was on a FreeNAS.
> Then you later said bug does not happen in Debian 64bit.
> 
> Can you clarify the problem happens only when pipelining on either Linux
> based or FreeBSD based system ? or just on FreeBSD based system ?

The memory leak is present on *BSD. And it seems also of linux arm
platforms (as said by another user)
I've NOT experienced this bug in debian x64



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread bpa


Simonef wrote: 
> No, the bug has to do with the pipelining. I have passed the witness to
> philippe44 to analyze the code.

I got a little lost on platforms being used. 
Your initial report was on a FreeNAS.
Then you later said bug does not happen in Debian 64bit.

Can you clarify the problem happens only when transcoding on either
Linux based or FreeBSD based system ? or just on FreeBSD based system ?



bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-07 Thread Simonef


mherger wrote: 
> > @mherger I made a pull request on slimserver-vendor
> Would that PR fix the issue you've reported here?

No, the bug has to do with the pipelining. I have passed the witness to
philippe44 to analyze the code.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread Michael Herger

@mherger I made a pull request on slimserver-vendor

Would that PR fix the issue you've reported here?
___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread Simonef


philippe_44 wrote: 
> Sorry my bad: from memory, I was remembering
> 
> And for some reasons I thought it meant your actual system was 32 bits

Oh! no problem. If you need some help for testing or other things don't
hesitate to contact me.

@mherger I made a pull request on slimserver-vendor



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread philippe_44


Simonef wrote: 
> What?
> all the system I have tested on are 64bit, Perl version 5.32

Sorry my bad: from memory, I was remembering
> 
> With Debian 64bit this bug does not seem to happen at all.
> 
And for some reasons I thought it meant your actual system was 32 bits



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread Simonef


philippe_44 wrote: 
> Yous aid it does not happen with x64, right? What Perl version is this
> on x86?

What?
all the system I have tested on are 64bit, Perl version 5.32



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread philippe_44


philippe_44 wrote: 
> Have you tried with transcoding but without use of sox (choose a
> transcoding requirement that does not need it like "ops mp3" or "mp3 mp3
> transcode forced by bitrate limitation. The idea is to see if this is
> specific to an external transcoder, especially sox, or if this is due to
> the pipeline process itself ( I think you said that it does not happen
> w/o transcoding).
> 
> Other than that, does it happen with 7.9?

I had a quick look at the pipeline code and could not find anything
obvious (reading code with memory leak in mind). Yous aid it does not
happen with x64, right? What Perl version is this on x86?



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread philippe_44


Simonef wrote: 
> Same problem if transcoding without sox. Flac->mp3 and Flac->pcm dont
> use SoX and shows the same beahviour.
> I just tried with lms 7.9.4, same behaviour again.
> 
> w/o transcoding it seems to not happen at all.

Excellent, that seems to point around the pipeline then



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-06 Thread Simonef


philippe_44 wrote: 
> Have you tried with transcoding but without use of sox (choose a
> transcoding requirement that does not need it like "ops mp3" or "mp3 mp3
> transcode forced by bitrate limitation. The idea is to see if this is
> specific to an external transcoder, especially sox, or if this is due to
> the pipeline process itself ( I think you said that it does not happen
> w/o transcoding).
> 
> Other than that, does it happen with 7.9?

Same problem if transcoding without sox. Flac->mp3 and Flac->pcm dont
use SoX and shows the same beahviour.
I just tried with lms 7.9.4, same behaviour again.

w/o transcoding it seems to not happen at all.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-05 Thread philippe_44


Simonef wrote: 
> Thanks a lot for the encouragement.
> It seems to be correlated proportionally to the type of transcoding you
> want to do.
> As an example:
> With very small files and light transcoding (to MP3 for ex) It takes
> hours to show a minimum RAM usage above the normal (where normal Is
> ~120-200MB)
> With a more intensive transcoding, like an upsampling of a FLAC file, It
> Is pretty noticeable in a few minutes that the RAM usage starts
> growing.
> I tried with an Extreme case like FLAC->RAW 32bit/384kHz->1 milion taps
> FIR filter -> DSD128 and the RAM usage of the perl process starts to
> grow like Crazy (1gb After 2 songs).
> What Is curious is that also the CPU usage grows proportionally, and I
> mean not the CPU usage of the external utilities used for transcoding
> but of the slimserv.pl process; in the last case It was using 30% of one
> core of a xeon e5-2697 V3, which Is A LOT.
> 
> I'd like to solve it because I'm pretty much the only unofficial
> maintainer of the version for FreeBSD/FreeNAS/TrueNas, and for the
> moment, I answered to those who contacted me about this bug to set up a
> cronjob to restart LMS periodically so it doesn't eat all the RAM As
> a temporary "fix"
> 
> With Debian 64bit this bug does not seem to happen at all.
> 
> I tried to proceed on the 'memory debug' route. 
> 2 of those modules needed for the memory debug were not working,
> (B::Size and B::LexInfo) they are not maintained (for something like 15
> years). I managed to fix them, but still MemoryUsage.pm gives another
> error, It tries to call the 'FILL' method in the B::PADNAME class in
> B::C, which, in fact, does not seem to exist. (See here
> https://perldoc.perl.org/B#B::PADNAME-Methods)
> 
> In the mean time I managed to update all the CPAN modules in
> slimserver-vendor and correct the building script accordingly (some of
> them were out of date by more than 10yrs), Tomorrow I'll make the pull
> request.
> 
> @philippe_44 or @mherger at this point I'm pretty stucked. If One of you
> Is willing to help and try to recreate the bug in a local VM I'll send
> you instruction in PM (It pretty quick to recreate It). I usually Always
> try to find the way out by myself, but my weak knowledge of perl is
> limiting and I'm a bit lost After all these failed attempts.

Have you tried with transcoding but without use of sox (choose a
transcoding requirement that does not need it like "ops mp3" or "mp3 mp3
transcode forced by bitrate limitation. The idea is to see if this is
specific to an external transcoder, especially sox, or if this is due to
the pipeline process itself.



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-05 Thread Simonef


mvordeme wrote: 
> Just for your encouragement, since you seem pretty well on your way
> without interference from my side: It seems that I can observe the leak
> as well with standard transcoding settings, only it is so subtle that I
> will probably upgrade my LMS before the Pi runs out of memory. My LMS is
> up since about 20 days, and it currently has the following memory
> footprint. So far, I have never seen it shrink.
> > 
Code:

  >   > Mem: 1808960K used, 145392K free, 94768K shrd, 21020K buff, 1121756K 
cached
  > CPU:  1.2% usr  0.0% sys  0.0% nic 98.6% idle  0.0% io  0.0% irq  0.0% sirq
  > Load average: 0.01 0.07 0.08 1/141 1992
  > PID  PPID USER STAT   VSZ %VSZ CPU %CPU COMMAND
  > 32307 1 tc   S 526m 27.5   0  0.4 {slimserver.pl} /usr/bin/perl 
/usr/local/slimserver/slimserver.pl --daemon --user tc --group staff

> > 

Thanks a lot for the encouragement.
It seems to be correlated proportionally to the type of transcoding you
want to do.
As an example:
With very small files and light transcoding (to MP3 for ex) It takes
hours to show a minimum RAM usage above the normal (where normal Is
~120-200MB)
With a more intensive transcoding, like an upsampling of a FLAC file, It
Is pretty noticeable in a few minutes that the RAM usage starts
growing.
I tried with an Extreme case like FLAC->RAW 32bit/384kHz->1 milion taps
FIR filter -> DSD128 and the RAM usage of the perl process starts to
grow like Crazy (1gb After 2 songs).
What Is curious is that also the CPU usage grows proportionally, and I
mean not the CPU usage of the external utilities used for transcoding
but of the slimserv.pl process; in the last case It was using 30% of one
core of a xeon e5-2697 V3, which Is A LOT.

I'd like to solve it because I'm pretty much the only unofficial
maintainer of the version for FreeBSD/FreeNAS/TrueNas, and for the
moment, I answered to those who contacted me about this bug to set up a
cronjob to restart LMS periodically so it doesn't eat all the RAM As
a temporary "fix"

With Debian 64bit this bug does not seem to happen at all.

I tried to proceed on the 'memory debug' route. 
2 of those modules needed for the memory debug were not working,
(B::Size and B::LexInfo) they are not maintained (for something like 15
years). I managed to fix them, but still MemoryUsage.pm gives another
error, It tries to call the 'FILL' method in the B::PADNAME class in
B::C, which, in fact, does not seem to exist. (See here
https://perldoc.perl.org/B#B::PADNAME-Methods)

In the mean time I managed to update all the CPAN modules in
slimserver-vendor and correct the building script accordingly (some of
them were out of date by more than 10yrs), Tomorrow I'll make the pull
request.

@philippe_44 or @mherger at this point I'm pretty stucked. If One of you
Is willing to help and try to recreate the bug in a local VM I'll send
you instruction in PM (It pretty quick to recreate It). I usually Always
try to find the way out by myself, but my weak knowledge of perl is
limiting and I'm a bit lost After all these failed attempts.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-05 Thread mvordeme


Just for your encouragement, since you seem pretty well on your way
without interference from my side: It seems that I can observe the leak
as well with standard transcoding settings, only it is so subtle that I
will probably upgrade my LMS before the Pi runs out of memory. My LMS is
up since about 20 days, and it currently has the following memory
footprint. So far, I have never seen it shrink.

Code:

Mem: 1808960K used, 145392K free, 94768K shrd, 21020K buff, 1121756K cached
  CPU:  1.2% usr  0.0% sys  0.0% nic 98.6% idle  0.0% io  0.0% irq  0.0% sirq
  Load average: 0.01 0.07 0.08 1/141 1992
  PID  PPID USER STAT   VSZ %VSZ CPU %CPU COMMAND
  32307 1 tc   S 526m 27.5   0  0.4 {slimserver.pl} /usr/bin/perl 
/usr/local/slimserver/slimserver.pl --daemon --user tc --group staff




scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-05 Thread Simonef


mherger wrote: 
> >> You'll need to install Devel::NYTProf for your Perl. And then run
> with
> >> above parameter. Please note that running LMS this way can generate a
> >> ton of data which will take a while to analyze by the NTYProf tools.
> But
> > 
> > Ok installed all the dependencies required. Had to fix some of them
> > because very old.
> > I expected to find the result in server.log but I was wrong.
> 
> I'm sorry, I got that wrong... Devel::NYTProf is not used for the memory
> 
> monitoring, but CPU. I believe I never got server.memory debugging 
> working in recent years...
> 
> From what I understand reading the module it requires the following:
> 
> use B ();
> use B::Asmdata qw(@specialsv_name);
> use B::Size ();
> use B::LexInfo ();
> use Devel::Peek ();
> use Devel::Size ();
> use Devel::Symdump ();
> Data::TreeDumper
> 
> If you get server.memory working, you should have a new web page 
> /memoryusage.html which would give you some overview of the memory
> usage.
> 
> -- 
> 
> Michael

I was missing that I had to go to /memoryusage.html
Thanks, I'll try and report back.

P.S. while I was messing with the buildme.sh script I made some fix,
updated some modules and added a command line argument to make the
compile multithreaded. Once I solved this memory leak problem I will
make a pull request on github so you can decide whether it's worth
merging or not.

philippe_44 wrote: 
> But then you are not playing HTTPS services, right? I know it sounds
> like a silly question but I want to make sure before I dig again into
> all the contorted SSL elements activated in LMS. There are many things
> there, its difficult to find its way sometimes. For
> example the code for NB sockets is different when SSL is involved and
> there are buffer associated to cache between calls.

Since I don't want to waste anyone's time let me do some more test
debugging the memory usage. If I won't come to any conclusion I'll
contact you directly.

Thank you both for your time.
Simone



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-05 Thread Michael Herger

You'll need to install Devel::NYTProf for your Perl. And then run with
above parameter. Please note that running LMS this way can generate a
ton of data which will take a while to analyze by the NTYProf tools. But


Ok installed all the dependencies required. Had to fix some of them
because very old.
I expected to find the result in server.log but I was wrong.


I'm sorry, I got that wrong... Devel::NYTProf is not used for the memory 
monitoring, but CPU. I believe I never got server.memory debugging 
working in recent years...


From what I understand reading the module it requires the following:

use B ();
use B::Asmdata qw(@specialsv_name);
use B::Size ();
use B::LexInfo ();
use Devel::Peek ();
use Devel::Size ();
use Devel::Symdump ();
Data::TreeDumper

If you get server.memory working, you should have a new web page 
/memoryusage.html which would give you some overview of the memory usage.


--

Michael
___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-04 Thread philippe_44

But then you are not playing HTTPS services, right? I know it sounds
like a silly question but I want to make sure before I dig again into
all the contorted SSL elements activated in LMS. There are many things
there, it’s difficult to find it’s way sometimes. For example the code
for NB sockets is different when SSL is involved and there are buffer
associated to cache between calls.



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-03 Thread Simonef


mherger wrote: 
> > I tryed to set (server.memory) logging to debug to find out the cause
> of
> > the memory leak but I get:
> > Slim::bootstrap::tryModuleLoad (286) Warning: Module
> > [Slim::Utils::MemoryUsage] failed to load:
> 
> You'll need to install Devel::NYTProf for your Perl. And then run with 
> above parameter. Please note that running LMS this way can generate a 
> ton of data which will take a while to analyze by the NTYProf tools. But
> 
> it might help, indeed.
> 
> -- 
> 
> Michael

Ok installed all the dependencies required. Had to fix some of them
because very old.
I expected to find the result in server.log but I was wrong.

Can you please give me precise instructions after starting LMS with
logging->server.memory on debug?



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-03 Thread Michael Herger

I tryed to set (server.memory) logging to debug to find out the cause of
the memory leak but I get:
Slim::bootstrap::tryModuleLoad (286) Warning: Module
[Slim::Utils::MemoryUsage] failed to load:


You'll need to install Devel::NYTProf for your Perl. And then run with 
above parameter. Please note that running LMS this way can generate a 
ton of data which will take a while to analyze by the NTYProf tools. But 
it might help, indeed.


--

Michael
___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-02-03 Thread Simonef


mherger wrote: 
> > Before every test written below I restarted LMS, to have a sort of
> > baseline.
> > Player: squeezelite-x on windows and squeezelite-R2 on linux. Under
> file
> > types Flac->PCM is selected.
> 
> Could you please try again with all custom transcoding disabled?
> 
> What plugins are you using?

I tryed to set (server.memory) logging to debug to find out the cause of
the memory leak but I get:
Slim::bootstrap::tryModuleLoad (286) Warning: Module
[Slim::Utils::MemoryUsage] failed to load:

Any help would be appreciated



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-30 Thread Simonef


mherger wrote: 
> > Before every test written below I restarted LMS, to have a sort of
> > baseline.
> > Player: squeezelite-x on windows and squeezelite-R2 on linux. Under
> file
> > types Flac->PCM is selected.
> 
> Could you please try again with all custom transcoding disabled?
> 
> What plugins are you using?

Mmm .. curious, without any kind of transcoding this does not happen
(tested with both qobuz and local files)

Plugin list:

33170


+---+
|Filename: 6GHkp4B.png  |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=33170|
+---+


https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-29 Thread Michael Herger

Before every test written below I restarted LMS, to have a sort of
baseline.
Player: squeezelite-x on windows and squeezelite-R2 on linux. Under file
types Flac->PCM is selected.


Could you please try again with all custom transcoding disabled?

What plugins are you using?
___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-29 Thread Simonef


mherger wrote: 
> > About replicating... Just playing some local flacs or from Qobuz, in
> > both cases the leak happens
> 
> Could you try to replicate using only Qobuz? What formats are you 
> streaming? On what players? Could transcoding be involved?

I did some tests:

LIBRARY INFO:

Total Tracks: 7,058
Total Albums: 654
Total Artists: 446
Total Genres: 107
Total Playlists: 0
Total Playing Time: 539:11:36

QOBUZ LIBRARY: 
~400 albums
~5000 tracks

server.log and scanner.log very clean, not even a warning. I think I
should activate some more verbose loggin options, could you please tell
me which?

Before every test written below I restarted LMS, to have a sort of
baseline.
Player: squeezelite-x on windows and squeezelite-R2 on linux. Under file
types Flac->PCM is selected.

1) *Playing an album from the local library* : while playing the RAM
starts filling slowly. If I pause a track the RAM usage stop to raise.
At the end of the album RAM usage does not drop.
2) *Playing an album from Qobuz* : same as 1)
3) *Setting a more intensive transcoding from custom-convert.conf (I
used as a test flac->dsd)* : same as 1) but RAM is filled way faster
4) *With plugin Music and artist information (with pre-cache enabled) *
: if I start scrolling the album the RAM usage from ~200MB goes to ~3GB
c.ca.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread Michael Herger

About replicating... Just playing some local flacs or from Qobuz, in
both cases the leak happens


Could you try to replicate using only Qobuz? What formats are you 
streaming? On what players? Could transcoding be involved?

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread paul-


I would suspect that it has to do with database management.  Possibly
linked to online music integration.

How big is your local library  (number of tracks)

How big is your qobuz library.


server.log and scanner.log would be the place to start.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread Simonef


paul- wrote: 
> You cannot see memory leaks from htop output.  All that it shows you is
> memory used.

Of course, but based on memory used you can understand if a memory leak
Is happening. If usually a process takes from 100 to 400MB of RAM and
now It continues to grow until the whole 12GB are saturated then it's
not entirely wrong to suppose that a memory leak Is happening.
If there are some log files or whatever else that might be useful to
better understand the problem I'll attach them here.



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread paul-


You cannot see memory leaks from htop output.  All that it shows you is
memory used.



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread Simonef


paul- wrote: 
> Going to offer some proof? or information on how to replicate what you
> see?

Proof:
33146

About replicating... Just playing some local flacs or from Qobuz, in
both cases the leak happens


+---+
|Filename: Screenshot_20210129-015348797.jpg|
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=33146|
+---+


https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread paul-


Going to offer some proof? or information on how to replicate what you
see?



piCorePlayer a small player for the Raspberry Pi in RAM. 
Homepage: https://www.picoreplayer.org

Please 'donate'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations=U7JHY5WYHCNRU=GB_code=USD=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)
if you like the piCorePlayer

paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2021-01-28 Thread Simonef


I registered a memory leak of over 12GB(not using It on PCP), when RAM
Is full the process Is closed ofc.
Version: 8.1.2 - 167469

Is there already a fix?
Thanks,
Simone



https://audiodigitale.eu

Simonef's Profile: http://forums.slimdevices.com/member.php?userid=67438
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread mvordeme


Hm, I just did 
Code:

sudo ./lms-update.sh --release devel -s -r -u

 as prescribed. But I don't expect there to be any differences so far,
anyway.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.2.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread philippe_44


mvordeme wrote: 
> 8.1.0 was a nightly at the time. Version numbers seem a little volatile
> at the moment. Everything is fine with 8.2.0 - 1609139175 @ Mon Dec 28
> 09:23:00 CET 2020. Thanks a lot.

8.2 is the next feature release, 8.1.1 is the closer bug fix of 8.1
(here https://downloads.slimdevices.com/nightly/?ver=8.1)



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread mvordeme


8.1.0 was a nightly at the time. Version numbers seem a little volatile
at the moment. Everything is fine with 8.2.0 - 1609139175 @ Mon Dec 28
09:23:00 CET 2020. Thanks a lot.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.1.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread philippe_44


mvordeme wrote: 
> Thanks. So it may already be fixed. I am still on 8.1.0 - 1608064080 @
> Tue Dec 15 22:13:24 CET 2020.
yes, you need the nightly - Michael has not released yet an "official"
version



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread philippe_44


mvordeme wrote: 
> I found a test track, if you are interested. When you play the live
> album "Showtime, Storytime" by Nightwish, the last three seconds of the
> second track "Wish I Had an Angel" go missing. On which branch are you
> intending to fix it?

I tried as well with the version that contains the correction (8.1.1
nightly) and it seems to me it goes correctly to the end of the track.
With the bug, you would have missed ~50kB of data so 50*8/320 ~ 1.25
second



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread mvordeme


Thanks. So it may already be fixed. I am still on 8.1.0 - 1608064080 @
Tue Dec 15 22:13:24 CET 2020.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.1.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread CJS


mvordeme wrote: 
> I found a test track, if you are interested. When you play the live
> album "Showtime, Storytime" by Nightwish, the last three seconds of the
> second track "Wish I Had an Angel" go missing. On which branch are you
> intending to fix it?
Just out of curiosity, I tried to reproduce the skipping of the last 3
seconds of this specific track.
But on my system, this track plays fine until the end and transits
gapless into the next track. I am using the latest LMS 8.1.1 nighly
build.
System details below.

*Server*:
Logitech Media Server Version: 8.1.1 - 1609139162 @ Mon Dec 28 08:27:25
WEST 2020
Hostname: ATOM
Server IP Address: 192.168.0.101
Server HTTP Port Number: 9000
Operating system: Windows 7 - EN - cp1252
Platform Architecture: 8664
Perl Version: 5.14.1 - MSWin32-x86-multi-thread
Audio::Scan: 1.02
IO::Socket::SSL: 2.068
Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)

*Player*:
Raspberry Pi ZeroW with HifiBerry Zero DAC, running piCorePlayer 6.1.
Player Model: SqueezeLite
Player Type: squeezelite
Firmware: v1.9.8-1287-pCP

TIDAL Premium subscription (320kbps AAC streams).



| LMS 8.1.1 | Squeezebox Boom | RPi0W + pCP 6.1.0 + HiFiBerry DAC Zero |
SqueezeAMP |

CJS's Profile: http://forums.slimdevices.com/member.php?userid=68700
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-29 Thread mvordeme


I found a test track, if you are interested. When you play the live
album "Showtime, Storytime" by Nightwish, the last three seconds of the
second track "Wish I Had an Angel" go missing. On which branch are you
intending to fix it?



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.1.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-27 Thread mvordeme


Oh, this is cool. I actually watched a lot of YouTube over the holidays
and didn't have a chance to pin down a certain track on Tidal. Thanks a
lot for your dedication.



scaleo home server 2105 & picoreplayer 6.1.0 | logitech media server
8.1.0 | server power control 20120716.103808 |
transporter & duet & touch & boom & radio | rotel rc-995 & rmb-100 |
nubert nuvero 140

mvordeme's Profile: http://forums.slimdevices.com/member.php?userid=22892
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-23 Thread philippe_44


philippe_44 wrote: 
> So "unfortunately" no. Can you try with a player that natively supports
> mp4/aac? I'd like to rule-out faad

Found it this time, was my bad :eek::mad::mad::mad::eek:



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


Re: [SlimDevices: Unix] Memory Leak in Perl Engine on piCorePlayer?

2020-12-23 Thread philippe_44


mvordeme wrote: 
> I'll have an eye on whether it always affects the same tracks.

philippe_44 wrote: 
> I think I've identified a corner case that could explain the last block
> of a track being skipped

So "unfortunately" no. Can you try with a player that natively supports
mp4/aac? I'd like to rule-out faad



LMS 7.9  on Pi 3B+ & Odroid-C2 - *SqueezeAMP!*, 5xRadio, 3xBoom, 4xDuet,
1xTouch, 1 SB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2,
Squeezelite on Pi,  Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5,
Riva 1 & 3

philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=113321

___
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix


  1   2   >