Crash on launch (jemmalloc error) #57998

Closed
opened 2018-11-22 13:12:50 +01:00 by bastian salmela · 12 comments

System Information
Kubuntu 18.10
NVidia 840m, 390.87 driver.

Blender Version
Broken: 2.8 git master
Worked: (optional)

Short description of error
Blender compiles without errors, but when I run it, it crashes immediately
with an error: : Error in dlsym(RTLD_NEXT, "pthread_create")
has been happening for couple of weeks.

Blender downloaded from buildbots work fine.

Exact steps for others to reproduce the error
Compile, run

gdb log:
gdb.txt

**System Information** Kubuntu 18.10 NVidia 840m, 390.87 driver. **Blender Version** Broken: 2.8 git master Worked: (optional) **Short description of error** Blender compiles without errors, but when I run it, it crashes immediately with an error: <jemmalloc>: Error in dlsym(RTLD_NEXT, "pthread_create") has been happening for couple of weeks. Blender downloaded from buildbots work fine. **Exact steps for others to reproduce the error** Compile, run gdb log: [gdb.txt](https://archive.blender.org/developer/F5680265/gdb.txt)

Added subscriber: @bastiansalmela

Added subscriber: @bastiansalmela

Added subscriber: @brecht

Added subscriber: @brecht
Brecht Van Lommel self-assigned this 2018-11-22 16:38:16 +01:00

It's probably this bug in jemalloc:
https://github.com/jemalloc/jemalloc/issues/907

Can you try this patch? I don't have Ubuntu 18.10 installed to test.

diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 2b4d454..0143335 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -370,6 +370,11 @@ function(setup_liblinks
        set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE)
        set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE)
 
+       # jemalloc must be early in the list, to be before pthread (see T57998)
+       if(WITH_MEM_JEMALLOC)
+               target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
+       endif()
+
        target_link_libraries(
                ${target}
                ${PNG_LIBRARIES}
@@ -485,9 +490,6 @@ function(setup_liblinks
                        )
                endif()
        endif()
-       if(WITH_MEM_JEMALLOC)
-               target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
-       endif()
        if(WITH_MOD_CLOTH_ELTOPO)
                target_link_libraries(${target} ${LAPACK_LIBRARIES})
        endif()
It's probably this bug in jemalloc: https://github.com/jemalloc/jemalloc/issues/907 Can you try this patch? I don't have Ubuntu 18.10 installed to test. ``` diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 2b4d454..0143335 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -370,6 +370,11 @@ function(setup_liblinks set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}" PARENT_SCOPE) set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}" PARENT_SCOPE) + # jemalloc must be early in the list, to be before pthread (see T57998) + if(WITH_MEM_JEMALLOC) + target_link_libraries(${target} ${JEMALLOC_LIBRARIES}) + endif() + target_link_libraries( ${target} ${PNG_LIBRARIES} @@ -485,9 +490,6 @@ function(setup_liblinks ) endif() endif() - if(WITH_MEM_JEMALLOC) - target_link_libraries(${target} ${JEMALLOC_LIBRARIES}) - endif() if(WITH_MOD_CLOTH_ELTOPO) target_link_libraries(${target} ${LAPACK_LIBRARIES}) endif() ```

Added subscriber: @mont29

Added subscriber: @mont29

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

That is known issue, latest Ubuntu has buggy jemalloc package (ubuntu always have a buggy package it’d seem :( ). For now, please compile with WITH_MEM_JEMALLOC option disabled in CMake .

That is known issue, latest Ubuntu has buggy jemalloc package (ubuntu always have a buggy package it’d seem :( ). For now, please compile with WITH_MEM_JEMALLOC option disabled in CMake .

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

We answered at the same time, let's see if my workaround helps.

We answered at the same time, let's see if my workaround helps.

i'll try that.

In #57998#557284, @mont29 wrote:
That is known issue, latest Ubuntu has buggy jemalloc package (ubuntu always have a buggy package it’d seem :( ). For now, please compile with WITH_MEM_JEMALLOC option disabled in CMake .

hi,

i tried that, just ended up with more errors when running ..

compiling now with brechts changes, lets see.

.b
.b

i'll try that. > In #57998#557284, @mont29 wrote: > That is known issue, latest Ubuntu has buggy jemalloc package (ubuntu always have a buggy package it’d seem :( ). For now, please compile with WITH_MEM_JEMALLOC option disabled in CMake . hi, i tried that, just ended up with more errors when running .. compiling now with brechts changes, lets see. .b .b

hi, tested, and it worked. blender compiles and runs.
thank you!

.b

hi, tested, and it worked. blender compiles and runs. thank you! .b

This issue was referenced by 956e58679c

This issue was referenced by 956e58679ce6f381e4f069ba6c0628dc145083c4

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#57998
No description provided.