Admin console not accessable after 15-1 update

Re: Admin console not accessable after 15-1 update

Postby brinka123 » Wed Mar 26, 2014 7:39 pm

With 15-1 update (so kernel #199) and nzbget 12.0

I did

Code: Select all
root@NetworkSpace2:/ # sysctl -w vm.overcommit_memory=2
vm.overcommit_memory = 2


So memory allocation is not overcomitted,so for each malloc memory is allocated.

Previous setting was 0.

I applied some heavy load. (2 times urar, and run a 1080p movie) It didn't break...

Will let it run.
brinka123
Donator VIP
Donator VIP
 
Posts: 126
Joined: Sat Nov 17, 2012 3:06 pm

Re: Admin console not accessable after 15-1 update

Postby fvdw » Wed Mar 26, 2014 7:47 pm

interesting to see if that solves it

I tried once more the version without the usleep but with using memmove in that function.
It crashed again, but the funny thing is it still mentions memcpy as routine that failed, so that means another routine using memcpy must cause it.

Code: Select all
[70402.570673] Unable to handle kernel paging request at virtual address 001a7630
[70402.578259] pgd = c7948000
[70402.580962] [001a7630] *pgd=0f101831, *pte=00aba14f, *ppte=00abaffe
[70402.587275] Internal error: Oops: 805 [#1] PREEMPT ARM
[70402.592391] Modules linked in: iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi iscsi_trgt(O) usblp usb_storage ehci_hcd
[70402.603638] CPU: 0    Tainted: G           O  (3.9.5 #199)
[70402.609114] PC is at memcpy+0xc4/0x3a4
[70402.612846] LR is at 0x3d9cb376
[70402.615978] pc : [<c02d9044>]    lr : [<3d9cb376>]    psr: 20000013
[70402.615978] sp : c37a1ce4  ip : 00000010  fp : c37a0000
[70402.627403] r10: 00000400  r9 : cc193e44  r8 : 93545c4a
[70402.632605] r7 : eb233159  r6 : ac820c0b  r5 : 001a7630  r4 : c02d900c
[70402.639102] r3 : 00000010  r2 : 000003d0  r1 : cc193e54  r0 : 001a7630
[70402.645600] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[70402.652702] Control: 0005317f  Table: 07954000  DAC: 00000015
[70402.658421] Process nzbget (pid: 9485, stack limit = 0xc37a01b8)
[70402.664399] Stack: (0xc37a1ce4 to 0xc37a2000)
[70402.668746] 1ce0:          001a7630 c37a0000 00000000 00000400 001a7630 00000400 c02e4168
[70402.676894] 1d00: cf10169c cf17c3d8 00000400 c37a1ee4 00000400 00000400 cc193e44 c37a0000
[70402.685042] 1d20: c37a1edc c04a2978 00000400 00000000 000005a8 cf2c5160 00000400 c04a33dc
[70402.693190] 1d40: cf2c5160 00000000 c37a1edc ca084a00 00000000 cf2c5160 00000400 ca084cdc
[70402.701336] 1d60: 00000000 00000400 c37a0000 c04ef364 00000000 c011ef4c c089e500 00000000
[70402.709482] 1d80: 00000000 00000000 c37a1ee4 cfa5a720 00000000 00000001 00000001 0000176f
[70402.717631] 1da0: cc523dcc c37a1ee4 c0832eb0 00000000 00000000 cfa5a720 c37a0000 00000000
[70402.725778] 1dc0: b1cfe8b4 c050e4b8 00000000 00000000 c37a1ddc 00000000 cf68fe40 00000000
[70402.733927] 1de0: cf68fe40 00000400 c37a1ee4 c04976e8 00000000 00000001 00001000 00000000
[70402.742073] 1e00: 00000000 00000400 cf68fe40 00001000 00000000 c37a1ee4 00000000 00000000
[70402.750222] 1e20: cf27f6c0 c0063fe8 002cc000 00000000 c37a1f00 00001000 00000000 00000000
[70402.758368] 1e40: 00000000 00000001 ffffffff 00000000 00000000 00000000 00000000 00000000
[70402.766515] 1e60: cfa5a720 00000000 00000000 00000000 00000000 00000000 c37a1df8 00000000
[70402.774662] 1e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[70402.782810] 1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000400 cf68fe40
[70402.790958] 1ec0: 00000000 00000000 c37a1f00 c04995dc 00000000 fffffff7 00000001 001a7630
[70402.799107] 1ee0: 00000400 c37a1f00 00000080 c37a1edc 00000001 00000000 00000000 c00c4034
[70402.807253] 1f00: 002cd000 00000000 00000000 00000000 00001000 00000000 00000000 00000000
[70402.815400] 1f20: 00000000 00000001 00000000 00000000 00000000 00000000 00000000 cf27f6c8
[70402.823549] 1f40: c085bca0 00d5c9ac ffffffff 00000000 00001000 c37a1f90 b1cfe8d0 00000000
[70402.831697] 1f60: 0000004e c00121e8 c37a0000 b1cfe8d0 00000000 0000004e c00121e8 b1cfe8d0
[70402.839844] 1f80: b3f1f730 b3f12968 00000000 00000123 c00121e8 c0499640 00000000 00000000
[70402.847991] 1fa0: 00000400 c0012060 b3f1f730 b3f12968 00000008 001a7630 00000400 00000000
[70402.856139] 1fc0: b3f1f730 b3f12968 00000000 00000123 b1cff460 b60bc914 00000000 b1cfe8b4
[70402.864287] 1fe0: 00000000 b1cfe890 b6ea1cf0 b6ea2934 80000010 00000008 072cc782 d2bbf0bd
[70402.872438] Code: e1a00000 e4803004 e4804004 e4805004 (e4806004)
[70402.878647] ---[ end trace 103bfc60b7f481d1 ]---
[70402.883254] note: nzbget[9485] exited with preempt_count 1
root@nwsp2-5:/ #

it seems to be failing now on a different location
compare the LR value with the new values (error text with memcpy used in that function)
Code: Select all
89942.046558] CPU: 0    Tainted: G           O  (3.9.5 #199)
[89942.052034] PC is at memcpy+0xbc/0x3a4
[89942.055766] LR is at 0x30241439
[89942.058896] pc : [<c02d903c>]    lr : [<30241439>]    psr: 20000013
[89942.058896] sp : c8629ce4  ip : 00000008  fp : c8628000

however last line in nzbget.log are the same
Code: Select all
Wed Mar 26 20:37:03 2014   3054228576   DEBUG   Creating ArticleDownloader (ArticleDownloader.cpp:62:ArticleDownloader)
Wed Mar 26 20:37:03 2014   3054228576   DEBUG   Starting Thread (Thread.cpp:182:Start)
Wed Mar 26 20:37:03 2014   3054228576   DEBUG   fvdw ok create thread (Thread.cpp:209:Start)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Admin console not accessable after 15-1 update

Postby fvdw » Wed Mar 26, 2014 7:51 pm

this function in connection cpp has the also memcpy

Code: Select all
bool Connection::Recv(char * pBuffer, int iSize)
{
   debug("Receiving data (full buffer)");

   memset(pBuffer, 0, iSize);

   char* pBufPtr = (char*)pBuffer;
   int NeedBytes = iSize;

   if (m_iBufAvail > 0)
   {
      int len = iSize > m_iBufAvail ? m_iBufAvail : iSize;
      memcpy(pBufPtr, m_szBufPtr, len);
      pBufPtr += len;
      m_szBufPtr += len;
      m_iBufAvail -= len;
      NeedBytes -= len;
   }

   // Read from the socket until nothing remains
   while (NeedBytes > 0)
   {
      int iReceived = recv(m_iSocket, pBufPtr, NeedBytes, 0);
      // Did the recv succeed?
      if (iReceived <= 0)
      {
         ReportError("Could not receive data on socket", NULL, true, 0);
         return false;
      }
      pBufPtr += iReceived;
      NeedBytes -= iReceived;
   }
   return true;
}

I will try a version with that changed to memmove as well (and no usleep)
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Admin console not accessable after 15-1 update

Postby brinka123 » Wed Mar 26, 2014 9:14 pm

so that means another routine using memcpy must cause it.

Interesting..., yes then it should the memcpy in the recv function.

My test failed with the issue, no other statements in dmesg output.

Other thing i will test:
Increase the minimum free memory using:

sysctl -w vm.min_free_kbytes=16384
vm.min_free_kbytes = 16384

It was 2004......

I see that the free memory increases and never drops lower than 20 MB. Previously it dropped to 3MB. Maybe the new kernel needs more space?????
Lets see......
brinka123
Donator VIP
Donator VIP
 
Posts: 126
Joined: Sat Nov 17, 2012 3:06 pm

Re: Admin console not accessable after 15-1 update

Postby brinka123 » Wed Mar 26, 2014 9:29 pm

Nope, also the increase of vm.min_free_kbytes leads to the error, looks like it is generated faster....

Also when malloc fails, an ooms message should be expected in the dmesg output. We only see:
Unable to handle kernel paging request....

But still I see new malloc statements where the result is not tested....

See Connection::Connection function allocation of memory for m_szReadBuf....
Last edited by brinka123 on Wed Mar 26, 2014 9:37 pm, edited 1 time in total.
brinka123
Donator VIP
Donator VIP
 
Posts: 126
Joined: Sat Nov 17, 2012 3:06 pm

Re: Admin console not accessable after 15-1 update

Postby fvdw » Wed Mar 26, 2014 9:36 pm

nzbget with all memcpy in connection.cpp replaced by memmove seems to run ok, not crashed yet
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Admin console not accessable after 15-1 update

Postby brinka123 » Wed Mar 26, 2014 9:37 pm

:please
brinka123
Donator VIP
Donator VIP
 
Posts: 126
Joined: Sat Nov 17, 2012 3:06 pm

Re: Admin console not accessable after 15-1 update

Postby fvdw » Wed Mar 26, 2014 9:43 pm

this is the version currently under test
You do not have the required permissions to view the files attached to this post.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Admin console not accessable after 15-1 update

Postby fvdw » Thu Mar 27, 2014 6:28 pm

this version with all three memcpy replaced by memmove is till running after 24 hours
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Admin console not accessable after 15-1 update

Postby brinka123 » Fri Mar 28, 2014 1:25 pm

OK I will test it too.
When it doesn't break we have to stop this investigation. Isn't it??

An other thing what I want to ask you, is that every download fails due parcheck isnt started.
Does it work at your side? Did I installed the libpar2 wrong or something??

Regards and thanks...
brinka123
Donator VIP
Donator VIP
 
Posts: 126
Joined: Sat Nov 17, 2012 3:06 pm

PreviousNext

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 5 guests