ebtables crashed with SIGSEGV in ebt_initialize_entry()

Bug #899315 reported by john morgan
80
This bug affects 15 people
Affects Status Importance Assigned to Milestone
ebtables (Ubuntu)
Fix Released
Medium
Albert Damen
Precise
Fix Released
Medium
Albert Damen

Bug Description

useing ubutu 12..04 tryed updating and generated this bug

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: ebtables 2.0.9.2-2ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-2.6-generic 3.2.0-rc3
Uname: Linux 3.2.0-2-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Sat Dec 3 07:17:25 2011
ExecutablePath: /sbin/ebtables
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
ProcCmdline: /sbin/ebtables -t nat -L
ProcEnviron: PATH=(custom, no user)
SegvAnalysis:
 Segfault happened at: 0x7f72a8fff753 <ebt_initialize_entry+83>: movl $0x1,0x70(%rax)
 PC (0x7f72a8fff753) ok
 source "$0x1" ok
 destination "0x70(%rax)" (0x00000070) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: ebtables
StacktraceTop:
 ebt_initialize_entry () from /lib/ebtables/libebtc.so
 do_command () from /lib/ebtables/libebtc.so
 ?? ()
 __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
 ?? ()
Title: ebtables crashed with SIGSEGV in ebt_initialize_entry()
UpgradeStatus: Upgraded to precise on 2011-11-30 (2 days ago)
UserGroups:

Related branches

Revision history for this message
john morgan (johnemorgan488) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 ebt_initialize_entry () from /tmp/tmpl5BBB0/lib/ebtables/libebtc.so
 do_command () from /tmp/tmpl5BBB0/lib/ebtables/libebtc.so
 ?? ()
 __libc_start_main (main=0x4005b0, argc=4, ubp_av=0x7fffea400b38, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffea400b28) at libc-start.c:226
 ?? ()

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in ebtables (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
john morgan (johnemorgan488) wrote :

up dated the softwear 17 hours age and it worked allwright turned on this morning and tryed to update again

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ebtables (Ubuntu):
status: New → Confirmed
visibility: private → public
Revision history for this message
john morgan (johnemorgan488) wrote :

i thik it is the same bug it times out on up date and hangs the up date and locks the up date manger.
i have to restar computer to unhang .
then the updates load

Revision history for this message
martyfelker (martyfelker-gmail) wrote : Re: [Bug 899315] Re: ebtables crashed with SIGSEGV in ebt_initialize_entry()

I think you could be right about the update manager failing (can't say
because no crash page appears). In any even I don't need to reboot -
it just goes away!

marty

On Fri, Dec 2, 2011 at 10:14 PM, john morgan <email address hidden> wrote:
> i thik it is  the same bug it times out on up date and hangs the up date and  locks the up date manger.
> i  have to restar computer to unhang .
> then the updates load
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/899315
>
> Title:
>  ebtables crashed with SIGSEGV in ebt_initialize_entry()
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/ebtables/+bug/899315/+subscriptions

--
Marty Felker
Floyd, VA

Revision history for this message
Albert Damen (albrt) wrote :

The segfault is cause by the as-needed compiler change. This also happened at SUSE, see https://bugzilla.novell.com/show_bug.cgi?id=567267.
The attached debdiff solves the issue for me. It builds, installs and runs fine (tested on amd64).
I also added a small change to get a dbgsym package for ebtables. The dbgsym package could not be created before, because the binaries were stripped in the upstream build system.

tags: added: as-needed
Revision history for this message
Micah Gersten (micahg) wrote :

@Albert Damen
Thank you for your patch. However, it would be better to fix the linking order in the upstream Makefile rather than disabling --as-needed. Would it be possible for you to update your patch to do this? I'm unsubscribing ubuntu-sponsors for the moment. Please resubscribe when ready. If you do not wish to do this work, simply unassign yourself.

Changed in ebtables (Ubuntu):
assignee: nobody → Albert Damen (albrt)
milestone: none → precise-alpha-2
status: Confirmed → Incomplete
tags: added: regression-release
Revision history for this message
Albert Damen (albrt) wrote :

Hi Micah,
I have tried several ways to get the package working without --no-as-needed, but no joy.
To my understanding the problem is:
- the plugins are needed to initialize structures in ebtables/libebtc. They do this via their magic _init functions, which run when the plugins are loaded, by calling ebt_register_target. ebt_register_target allocates memory and sets a pointer in libebtc (ebt_targets).
- ebtables does not use any symbols from the plugins, so linking with --as-needed will not actually link ebtables with the plugins. So, when ebtables is built with --as-needed, the plugins are not loaded, the structs are not initialized and the ebt_targets pointer is left to 0x0 --> crash when ebt_targets is used.

So in my opinion we need a way to force the plugins to be loaded when ebtables is run. Forcing the linking with --no-as-needed works, but maybe there are other ways?

As a side note, I wonder if using --no-as-needed is a big problem in this specific case. It only adds linking to plugins built from the same source package and shipped in the same binary package as ebtables itself. So this does not seem to cause problems with additional dependencies or complicate transitions?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ebtables - 2.0.9.2-2ubuntu2

---------------
ebtables (2.0.9.2-2ubuntu2) precise; urgency=low

  * Add patch 05link_with_no-as-needed.patch to link ebtables with
    --no-as-needed and adjust the link order to fix crash when running
    ebtables (LP: #899315)
  * debian/rules: add -g option to DEBCFLAGS, so symbols can be extracted
    into an ebtables-dbgsym package
 -- Albert Damen <email address hidden> Sun, 04 Dec 2011 21:19:58 +0100

Changed in ebtables (Ubuntu Precise):
status: Incomplete → Fix Released
Revision history for this message
martyfelker (martyfelker-gmail) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Marty

Marty Felker
Owner at Black Ridge Computer
Roanoke, Virginia Area

Confirm that you know Marty Felker:
https://www.linkedin.com/e/-a9fv1b-hasnqhxo-6r/isd/10067226998/JNrgcKN2/?hs=false&tok=10LeN6fREGNlw1

--
You are receiving Invitation to Connect emails. Click to unsubscribe:
http://www.linkedin.com/e/-a9fv1b-hasnqhxo-6r/VRgt3F5THzv1sWf4joE6Y4PTlkCEF63l1X6pAfB/goo/899315%40bugs%2Elaunchpad%2Enet/20061/I3354391771_1/?hs=false&tok=3RNaQ4ci4GNlw1

(c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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