← Back to team overview

yade-users team mailing list archive

Re: [Question #679445]: YADE Crash - SIGSEGV/SIGABRT handler called

 

Question #679445 on Yade changed:
https://answers.launchpad.net/yade/+question/679445

    Status: Needs information => Open

Son Pham Thai gave more information on the question:
Hi,

thanks for the response!

The new crash log I got is:

python: /usr/include/boost/smart_ptr/shared_ptr.hpp:646: typename
boost::detail::sp_dereference<T>::type boost::shared_ptr<T>::operator*()
const [with T = BodyContainer; typename
boost::detail::sp_dereference<T>::type = BodyContainer&]: Assertion `px
!= 0' failed.

SIGSEGV/SIGABRT handler called; gdb batch file is `/tmp/yade-
FSueZ2/tmp-0'

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.3) 7.7.1


Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Could not attach to process.  If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user.  For more details, see /etc/sysctl.d/10-ptrace.conf
/tmp/yade-FSueZ2/tmp-0:1: Error in sourced command file:
ptrace: Operation not permitted.
(gdb) 


To reproduce the above crash, pls try run these 2 following scripts (in
2 different terminals)

##########################
### --- Mini working scripts 1:   --- ###
##########################

# encoding: utf-8
### INPUT for Material ###
young0= 30e9
poisson0= 0.2
density0 = 2530
compFricDegree=15

### PARAMETERs of particle packing ###
mn=Vector3(0.,0.,0.)
mx=Vector3(.4e-2,.6e-2,.4e-2)
rMean0=4e-4
rRelFuzz0=5./100
porosity0=0.4
distributeMass0=True
seed0=1

### INPUT for mechanical loading ###
maxVel0=5e-7
confiningS= -2.725e5

### defining MATERIALs ###
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=radians(compFricDegree), density=density0, label='spheres'))
O.materials.append(FrictMat(young=young0,poisson=poisson0,frictionAngle=0,density=0,label='frictionlessWalls'))

### creating the boundary walls ###
walls=aabbWalls((mn,mx),thickness=0,material='frictionlessWalls')
wallIds=O.bodies.append(walls)

### generating spheres ###
sp=pack.SpherePack()
sp.makeCloud(minCorner=mn,maxCorner=mx,rMean=rMean0,rRelFuzz=rRelFuzz0,porosity=porosity0,distributeMass=distributeMass0,seed=seed0) # POLY
O.bodies.append([utils.sphere(center,rad,material='spheres') for center,rad in sp])

### mechanical loading #### To confer a solid-like nature to the packing

triax=TriaxialStressController(
 internalCompaction=True,
 goal1=confiningS,
 goal2=confiningS,
 goal3=confiningS,
 max_vel=maxVel0,
 label="triax"
)

triax.maxMultiplier=1.+5e-6
triax.finalMaxMultiplier=1.+1e-7

newton=NewtonIntegrator(damping=.4, gravity=(0.0,-9.81,0.0))

O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(label='aabb'),Bo1_Box_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(label='Ig2ssGeom'),Ig2_Box_Sphere_ScGeom()],
  [Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=True,setCohesionOnNewContacts=True, label="cohesiveIp")],
  [Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(
   useIncrementalForm=True, always_use_moment_law=False, label='cohesiveLaw')]
 ),
 GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5),
 triax,
 newton
]

### --- 1st stage, particle growing while boundary walls are fixed --
###

NumDEMRun1=100000
while 1:

 O.run(NumDEMRun1,True)
 unb=unbalancedForce()

 if unb<0.01 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
  break

### --- 2nd stage, particle sizes are fixed while boundary walls move
very slowly -- ###

finalFricDegree = 30 # contact friction during the deviatoric loading
triax.internalCompaction=False
setContactFriction(radians(finalFricDegree))

NumDEMRun2=50000

while 1:

 O.run(NumDEMRun2 ,True)
 unb=unbalancedForce()

 if unb<0.001 and abs(triax.goal1-triax.meanStress)/abs(triax.goal1)<0.001:
  break

import os.path
initStateFilename="savedPacking" +".yade.gz"
savedState = os.path.exists(initStateFilename)
O.save(initStateFilename)

##########################
### --- Mini working scripts 2:   --- ###
##########################

# encoding: utf-8

import os.path
initStateFilename='savedPacking.yade.gz' 
O.load(initStateFilename)

compFricDegree = 1 
young0= 30e9
poisson0= 0.2
density0 = 2530
tensileStrength = 40e5
shearStrength = 40e6

### setup the material properties, first, Cohesion material
O.materials.append(CohFrictMat(young=young0,poisson=poisson0,density=density0,frictionAngle=radians(compFricDegree), normalCohesion=tensileStrength, shearCohesion=shearStrength, momentRotationLaw=True,label='CohFrictspheres'))

### --- change material of the spheres to create cohesive bond between
particles --- ###

pairs = [(i.id1,i.id2) for i in O.interactions]
for b in O.bodies:
 if not isinstance(b.shape,Box):
  b.mat = O.materials[2]
  ### [0] is Friction spheres, [1] is frictionlessWalls, [2] is the newly added CohFrict sphere

O.interactions.clear()
for id1,id2 in pairs: utils.createInteraction(id1,id2) ### The crash occurs here, detected by uncommenting line by line

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.