apt-get update generates a segmentation fault

Bug #1513539 reported by guillaume thouvenin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fuel Plugins
Invalid
Critical
LMA-Toolchain Fuel Plugins
Fuel for OpenStack
Invalid
Medium
guillaume thouvenin
StackLight
Invalid
Critical
guillaume thouvenin
vmware-dvs
New
Undecided
Unassigned

Bug Description

The deployment of stable/0.8 failed with the following message:

Deployment has failed. Method granular_deploy. Failed to execute hook 'lma_infrastructure_alerting-0.8.0' Failed to run command cd / && apt-get update

When we connect to the LMA node and run the command "apt-get update" manually we've got a segmentation fault. It is the same if we use the command "apt-cache stats".

If we run the command "echo 'APT::Cache-Start 50331648;' >/etc/apt/apt.conf.d/99cache-start" if fixes the problem.

Tags: area-linux lma
Changed in lma-toolchain:
assignee: nobody → LMA-Toolchain Fuel Plugins (mos-lma-toolchain)
importance: Undecided → Critical
Revision history for this message
guillaume thouvenin (guillaume-thouvenin) wrote :

After looking more deeply the problem occurs when there are too many packages in the cache and apt failed to resize the cache. By default the value is 25165824. If you go over this value the remapping of the memory produces a SIGSEVG...

mremap(0x7f47dcbd2000, 25165824, 26214400, MREMAP_MAYMOVE) = 0x7f47db2d2000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7f47de3c7dec} ---
+++ killed by SIGSEGV +++

Revision history for this message
Simon Pasquier (simon-pasquier) wrote :

I've added the Fuel project to this bug since this isn't strictly related to LMA.

The bug itself is located in apt-get and could potentially affect Fuel even when no plugin is deployed. When "apt-get update" retrieves too many packages, it will attempt to extend the allocated memory by calling mremap() which eventually fails with a SIGSEGV...

[0] http://man7.org/linux/man-pages/man2/mremap.2.html

Changed in fuel-plugins:
status: New → Confirmed
tags: added: lma
Changed in fuel-plugins:
importance: Undecided → Critical
assignee: nobody → LMA-Toolchain Fuel Plugins (mos-lma-toolchain)
milestone: none → 7.0
Dmitry Klenov (dklenov)
Changed in fuel:
milestone: none → 8.0
assignee: nobody → MOS Linux (mos-linux)
tags: added: area-linux
Changed in fuel:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugin-lma-collector (master)

Fix proposed to branch: master
Review: https://review.openstack.org/242438

Changed in fuel:
assignee: MOS Linux (mos-linux) → guillaume thouvenin (guillaume-thouvenin)
status: Confirmed → In Progress
Revision history for this message
Simon Pasquier (simon-pasquier) wrote :

@Dmitry, sorry for having unassigned the bug on the Fuel project but Gerrit had assigned it to Guillaume because of the review in the LMA project :-(

Changed in lma-toolchain:
assignee: LMA-Toolchain Fuel Plugins (mos-lma-toolchain) → guillaume thouvenin (guillaume-thouvenin)
Changed in fuel:
assignee: guillaume thouvenin (guillaume-thouvenin) → nobody
Revision history for this message
Dmitry Teselkin (teselkin-d) wrote :

Could you please try to increate Cache-Limit instead of Cache-Start and check if it helps?

Revision history for this message
Dmitry Klenov (dklenov) wrote :

@Simon, NP, I have assigned it back to MOS-linux team.

Changed in fuel:
assignee: nobody → MOS Linux (mos-linux)
Revision history for this message
Simon Pasquier (simon-pasquier) wrote :

@DmitryT, we tried it but it doesn't help because by default Cache-Limit is 0 (eg no limit).

Revision history for this message
Jay Pipes (jaypipes) wrote :

How about setting Cache-Limit to a non-zero value so that you limit the amount of memory assigned to the cache?

Revision history for this message
Aleksander Mogylchenko (amogylchenko) wrote :

It should not be critical if the workaround is a one line fix.

Changed in fuel:
importance: Critical → Medium
Changed in fuel:
assignee: MOS Linux (mos-linux) → guillaume thouvenin (guillaume-thouvenin)
Changed in lma-toolchain:
status: Confirmed → In Progress
Revision history for this message
Simon Pasquier (simon-pasquier) wrote :

"Unfortunately" we couldn't reproduce the bug anymore... We'll re-open the bug if the issue arises again.

Changed in fuel-plugins:
status: Confirmed → Invalid
Changed in lma-toolchain:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugin-lma-collector (master)

Change abandoned by Guillaume Thouvenin (<email address hidden>) on branch: master
Review: https://review.openstack.org/242438
Reason: We can not reproduce the problem.

Revision history for this message
Vyacheslav Tabolin (slavchick) wrote :
Changed in fuel:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.