From: Michael Doig (m.doig_at_sms.ed.ac.uk)
Date: Wed Feb 15 2012 - 04:21:28 CST

Sorry for the delay responding - I've been away from my computer for a
few days.

Thank you both for your help. ulimit -s unlimited fixed the problem for me.

Regards,
Michael.

On 10/02/12 22:25, Axel Kohlmeyer wrote:
> On Thu, Feb 9, 2012 at 4:58 AM, Michael Doig<m.doig_at_sms.ed.ac.uk> wrote:
>> John,
>>
>> I have tried running VMD (64bit) on 2 different computers:
>> Both running Ubuntu 10.04.3 LTS - 64bit
>> 1) Intel i7-860 2.8Ghz, 6GB RAM
>> 2) Dual Intel Xeon E5620 2.4Ghz, 12GB RAM
>>
>> Both of which return the same errors.
> michael,
>
> please check your stack size (ulimit -s).
> i made some tests on different machines
> and all that were giving problems for large
> systems in topotools, had a stack size limit.
>
> ulimit -s unlimited cured all cases.
>
> axel.
>
> p.s.: john, do you have an explanation for why
> this can result in this crazy deep recursion?
>
>
>> Regards,
>> Michael Doig
>>
>>
>>
>> On 08/02/12 16:03, John Stone wrote:
>>> Michael,
>>> What platform are you running VMD on? This seems to be an issue related
>>> to deep recursion running out of stack space, which is a problem that
>>> tends
>>> to crop up some platforms more than others, and sometimes you can get
>>> around
>>> it simply by setting an environment variable. If you can tell me what
>>> platforms you're using, I can provide you with some suggestions to try
>>> out.
>>>
>>> Cheers,
>>> John Stone
>>> vmd_at_ks.uiuc.edu
>>>
>>>
>>> On Wed, Feb 08, 2012 at 11:38:03AM +0000, Michael Doig wrote:
>>>> I have tried to use topotools to generate the LAMMPS topology file using
>>>> the new version of VMD (1.9.1) released on 4th Feb, with the same XYZ
>>>> coordinate file I sent to you previously.
>>>> I am still getting the same error as before - I have run it using gdb,
>>>> and have exactly the same error as before, involving the AtomParser
>>>> routine.
>>>> I have been able to get around this by looking at smaller sized systems,
>>>> but I am also aware of others having the same issues with this error.
>>>>
>>>> Regards,
>>>> Michael Doig.
>>>>
>>>> On 01/02/12 22:44, John Stone wrote:
>>>>> Hi,
>>>>> I've put in code to zero out the left/right nodes upon deletion.
>>>>> It shouldn't make any difference unless there's a bug elsewhere, but
>>>>> it won't hurt anything so for now let's hope it helps Michael with his
>>>>> problem in the short term. This will go in the final VMD 1.9.1 release.
>>>>>
>>>>> Cheers,
>>>>> John
>>>>>
>>>>> On Wed, Jan 25, 2012 at 03:50:46PM -0500, Axel Kohlmeyer wrote:
>>>>>> On Wed, Jan 25, 2012 at 3:11 PM, John Stone<johns_at_ks.uiuc.edu> wrote:
>>>>>>> Michael,
>>>>>>> I ran this on my machine, and it did not crash.
>>>>>> john,
>>>>>>
>>>>>> i *could* reproduce the crash. it seems to be running out
>>>>>> of stack space during a recursive call to the destructor
>>>>>> of the atomparser_node class. the following patch fixes
>>>>>> it for me. you know that part of the code so much better
>>>>>> than me, so i'd like you to check if this makes sense.
>>>>>>
>>>>>> Index: AtomParser.h
>>>>>> ===================================================================
>>>>>> RCS file: /vmd/cvsroot/vmd/src/AtomParser.h,v
>>>>>> retrieving revision 1.24
>>>>>> diff -u -r1.24 AtomParser.h
>>>>>> --- AtomParser.h 16 Dec 2010 04:08:02 -0000 1.24
>>>>>> +++ AtomParser.h 25 Jan 2012 20:34:23 -0000
>>>>>> @@ -60,8 +60,8 @@
>>>>>> /// e.g. a list of 500,000 residue names can blow the stack.
>>>>>> /// This needs to be redesigned to avoid recursion
>>>>>> ~atomparser_node(void) { // destructor
>>>>>> - if (left) delete left;
>>>>>> - if (right) delete right;
>>>>>> + if (left) { delete left ; left=NULL; }
>>>>>> + if (right) { delete right ; right=NULL;}
>>>>>> }
>>>>>> } atomparser_node;
>>>>>>
>>>>>>
>>>>>> cheers,
>>>>>> axel.
>>>>>>
>>>>>>> Can you tell us exactly what console output you got from VMD when
>>>>>>> you ran these commands? Please include _everything_ up to the crash.
>>>>>>>
>>>>>>> Here's what I get:
>>>>>>> Info) VMD for LINUX, version 1.9.1beta1 (December 29, 2011)
>>>>>>> Info) http://www.ks.uiuc.edu/Research/vmd/
>>>>>>> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
>>>>>>> Info) Please include this reference in published work using VMD:
>>>>>>> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
>>>>>>> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
>>>>>>> Info) -------------------------------------------------------------
>>>>>>> Info) Multithreading available, 4 CPUs detected.
>>>>>>> Info) Free system memory: 5051MB (63%)
>>>>>>> Info) Creating CUDA device pool and initializing hardware...
>>>>>>> Info) Detected 3 available CUDA accelerators:
>>>>>>> Info) [0] GeForce GTX 285 30 SM_1.3 @ 1.48 GHz, 1023MB RAM, KTO,
>>>>>>> OIO, ZCP
>>>>>>> Info) [1] Tesla C870 16 SM_1.0 @ 1.35 GHz, 1535MB RAM
>>>>>>> Info) [2] Tesla C870 16 SM_1.0 @ 1.35 GHz, 1535MB RAM
>>>>>>> Info) OpenGL renderer: GeForce GTX 285/PCI/SSE2
>>>>>>> Info) Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS GLSL(OVFG)
>>>>>>> Info) Full GLSL rendering mode is available.
>>>>>>> Info) Textures: 2-D (8192x8192), 3-D (2048x2048x2048), Multitexture
>>>>>>> (4)
>>>>>>> Info) Dynamically loaded 2 plugins in directory:
>>>>>>> Info) /Projects/vmd/pub/linux/lib/vmd191beta1/plugins/LINUX/molfile
>>>>>>> Info) Dynamically loaded 2 plugins in directory:
>>>>>>> Info) /home/johns/plugins/compile/lib_LINUX/molfile
>>>>>>> vmd> mol new [glob *.xyz]
>>>>>>> Info) Using plugin xyz for structure file sq.packed.xyz
>>>>>>> Info) Using plugin xyz for coordinates from file sq.packed.xyz
>>>>>>> Info) Determining bond structure from distance search ...
>>>>>>> Info) Analyzing structure ...
>>>>>>> Info) Atoms: 376832
>>>>>>> Info) Bonds: 372736
>>>>>>> Info) Angles: 0 Dihedrals: 0 Impropers: 0 Cross-terms: 0
>>>>>>> Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes:
>>>>>>> 0
>>>>>>> Info) Residues: 4096
>>>>>>> Info) Waters: 0
>>>>>>> Info) Segments: 1
>>>>>>> Info) Fragments: 4096 Protein: 0 Nucleic: 0
>>>>>>> 0
>>>>>>> Info) Finished with coordinate file sq.packed.xyz.
>>>>>>> vmd> topo retypebonds
>>>>>>> vmd> topo guessangles
>>>>>>> vmd> topo guessdihedrals
>>>>>>> vmd> topo writelammpsdata sq.lammps.data
>>>>>>> Info) writing LAMMPS Masses section.
>>>>>>> Info) writing LAMMPS Atoms section in style 'full'.
>>>>>>> Info) writing LAMMPS Bonds section.
>>>>>>> Info) writing LAMMPS Angles section.
>>>>>>> Info) writing LAMMPS Dihedrals section.
>>>>>>> vmd>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Jan 24, 2012 at 04:44:43PM +0000, Michael Doig wrote:
>>>>>>>> John
>>>>>>>>
>>>>>>>> I have attached a gzipped copy of the xyz file. It only contains 1
>>>>>>>> type
>>>>>>>> of molecule (will be expanding to look at mixtures later). Regarding
>>>>>>>> the
>>>>>>>> script that I use, after I have loaded the xyz file in VMD, I run the
>>>>>>>> following 4 commands from the command line.
>>>>>>>>
>>>>>>>> topo retypebonds
>>>>>>>> topo guessangles
>>>>>>>> topo guessdihedrals
>>>>>>>> topo writelammpsdata sq.lammps.data
>>>>>>>>
>>>>>>>>
>>>>>>>> which then segfaults.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Michael Doig
>>>>>>>>
>>>>>>>> On 24/01/12 16:15, John Stone wrote:
>>>>>>>>> Would it be possible for you to package up all of the files you're
>>>>>>>>> working with and provide a script that runs topotools and
>>>>>>>>> causes the crash you observe? If you can do that, and either post
>>>>>>>>> it
>>>>>>>>> somewhere that I can download it, or send it to me (if it is small)
>>>>>>>>> I will have a close look at what is going on there and see if I can
>>>>>>>>> track down the source of that problem.
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> John Stone
>>>>>>>>> vmd_at_ks.uiuc.edu
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Jan 24, 2012 at 04:13:24PM +0000, Michael Doig wrote:
>>>>>>>>>> On 24/01/12 16:09, John Stone wrote:
>>>>>>>>>>> Michael,
>>>>>>>>>>> Thanks for the gdb traceback. Are you running a 32-bit or
>>>>>>>>>>> 64-bit
>>>>>>>>>>> version of VMD?
>>>>>>>>>>>
>>>>>>>>>> I'm running the 64-bit version of VMD.
>>>>>>>>>>
>>>>>>>>>>> Cheers,
>>>>>>>>>>> John Stone
>>>>>>>>>>> vmd_at_ks.uiuc.edu
>>>>>>>>>>>
>>>>>>>>>>> On Tue, Jan 24, 2012 at 03:55:23PM +0000, Michael Doig wrote:
>>>>>>>>>>>> On 24/01/12 14:46, Axel Kohlmeyer wrote:
>>>>>>>>>>>>>>> Please try again with the latest VMD beta version.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Axel
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I tried the new beta version of VMD and get the same result. I
>>>>>>>>>>>>>> tried
>>>>>>>>>>>>>> it
>>>>>>>>>>>>>> with
>>>>>>>>>>>>>> both the bundled version of topotools (not sure which version),
>>>>>>>>>>>>>> and
>>>>>>>>>>>>>> the
>>>>>>>>>>>>>> newest version from your website (topotools-1.2-20120114), but
>>>>>>>>>>>>>> it
>>>>>>>>>>>>>> continues
>>>>>>>>>>>>>> to segfault, at the writelammpsdata stage.
>>>>>>>>>>>>> ok. that means that you are not stumbling over the bug
>>>>>>>>>>>>> that was fixed in the beta.
>>>>>>>>>>>>>
>>>>>>>>>>>>> any segfault has to either come from a bug inside of VMD
>>>>>>>>>>>>> or you running out of stack/address space.
>>>>>>>>>>>>>
>>>>>>>>>>>>> can you please try one more thing to help identifying
>>>>>>>>>>>>> the real cause. please launch VMD like this
>>>>>>>>>>>>>
>>>>>>>>>>>>> vmd -debug
>>>>>>>>>>>>>
>>>>>>>>>>>>> then at the (gdb) prompt type "run"
>>>>>>>>>>>>>
>>>>>>>>>>>>> and then proceed as usual until you get the segfault.
>>>>>>>>>>>>> this should drop you back into the debugger.
>>>>>>>>>>>>> then type "where"
>>>>>>>>>>>>>
>>>>>>>>>>>>> and report back the output.
>>>>>>>>>>>>>
>>>>>>>>>>>>> thanks,
>>>>>>>>>>>>> axel.
>>>>>>>>>>>>>
>>>>>>>>>>>> I have run with the debugger as you suggested and this the
>>>>>>>>>>>> output.
>>>>>>>>>>>>
>>>>>>>>>>>> Program received signal SIGSEGV, Segmentation fault.
>>>>>>>>>>>> 0x00000000004f8bd1 in atomparser_node::~atomparser_node() ()
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> #0 0x00000000004f8bd1 in atomparser_node::~atomparser_node() ()
>>>>>>>>>>>> #1 0x00000000004f8be7 in atomparser_node::~atomparser_node() ()
>>>>>>>>>>>> #2 0x00000000004f8bd1 in atomparser_node::~atomparser_node() ()
>>>>>>>>>>>> ...
>>>>>>>>>>>> ...
>>>>>>>>>>>> ...
>>>>>>>>>>>> #327223 0x00000000004f8be7 in atomparser_node::~atomparser_node()
>>>>>>>>>>>> ()
>>>>>>>>>>>> #327224 0x00000000004f8be7 in atomparser_node::~atomparser_node()
>>>>>>>>>>>> ()
>>>>>>>>>>>> #327225 0x00000000004f8be7 in atomparser_node::~atomparser_node()
>>>>>>>>>>>> ()
>>>>>>>>>>>> #327226 0x00000000005ee8af in ParseTree::~ParseTree() ()
>>>>>>>>>>>> #327227 0x000000000050aebd in AtomSel::~AtomSel() ()
>>>>>>>>>>>> #327228 0x000000000068f8c2 in ?? ()
>>>>>>>>>>>> #327229 0x00000000008f3102 in Tcl_DeleteCommandFromToken ()
>>>>>>>>>>>> #327230 0x00000000008f45da in TclRenameCommand ()
>>>>>>>>>>>> #327231 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327232 0x0000000000937886 in ?? ()
>>>>>>>>>>>> #327233 0x0000000000972f77 in TclObjInterpProcCore ()
>>>>>>>>>>>> #327234 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327235 0x00000000008f680d in ?? ()
>>>>>>>>>>>> #327236 0x000000000097f955 in ?? ()
>>>>>>>>>>>> #327237 0x0000000000980f43 in TclCallVarTraces ()
>>>>>>>>>>>> #327238 0x0000000000986cf1 in ?? ()
>>>>>>>>>>>> #327239 0x0000000000989cac in ?? ()
>>>>>>>>>>>> #327240 0x0000000000989e30 in ?? ()
>>>>>>>>>>>> #327241 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327242 0x00000000008f680d in ?? ()
>>>>>>>>>>>> #327243 0x00000000008f740d in Tcl_Eval ()
>>>>>>>>>>>> #327244 0x00000000008f7497 in Tcl_VarEvalVA ()
>>>>>>>>>>>> #327245 0x00000000008f753d in Tcl_VarEval ()
>>>>>>>>>>>> #327246 0x000000000068e066 in ?? ()
>>>>>>>>>>>> #327247 0x000000000068be7b in ?? ()
>>>>>>>>>>>> #327248 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327249 0x0000000000937886 in ?? ()
>>>>>>>>>>>> #327250 0x0000000000972f77 in TclObjInterpProcCore ()
>>>>>>>>>>>> #327251 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327252 0x0000000000937886 in ?? ()
>>>>>>>>>>>> #327253 0x0000000000972f77 in TclObjInterpProcCore ()
>>>>>>>>>>>> #327254 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327255 0x0000000000937886 in ?? ()
>>>>>>>>>>>> #327256 0x0000000000972f77 in TclObjInterpProcCore ()
>>>>>>>>>>>> #327257 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327258 0x00000000008f5788 in Tcl_EvalObjv ()
>>>>>>>>>>>> #327259 0x000000000094499e in ?? ()
>>>>>>>>>>>> #327260 0x00000000008f55c7 in ?? ()
>>>>>>>>>>>> #327261 0x0000000000937886 in ?? ()
>>>>>>>>>>>> #327262 0x000000000093d7a4 in ?? ()
>>>>>>>>>>>> #327263 0x00000000008f7153 in TclEvalObjEx ()
>>>>>>>>>>>> #327264 0x00000000009431ec in Tcl_RecordAndEvalObj ()
>>>>>>>>>>>> #327265 0x00000000006a2bf0 in TclTextInterp::doEvent() ()
>>>>>>>>>>>> #327266 0x000000000064bfb1 in UIText::check_event() ()
>>>>>>>>>>>> #327267 0x000000000052af12 in CommandQueue::check_events() ()
>>>>>>>>>>>> #327268 0x000000000065cbd5 in VMDApp::VMDupdate(int) ()
>>>>>>>>>>>> #327269 0x0000000000686869 in main ()
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>>>>> Michael
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> The University of Edinburgh is a charitable body, registered
>>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>>> Scotland, with registration number SC005336.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> The University of Edinburgh is a charitable body, registered in
>>>>>>>>>>>>>> Scotland, with registration number SC005336.
>>>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> The University of Edinburgh is a charitable body, registered in
>>>>>>>>>>>> Scotland, with registration number SC005336.
>>>>>>>>>> --
>>>>>>>>>> The University of Edinburgh is a charitable body, registered in
>>>>>>>>>> Scotland, with registration number SC005336.
>>>>>>>> --
>>>>>>>> The University of Edinburgh is a charitable body, registered in
>>>>>>>> Scotland, with registration number SC005336.
>>>>>>>>
>>>>>>> --
>>>>>>> NIH Resource for Macromolecular Modeling and Bioinformatics
>>>>>>> Beckman Institute for Advanced Science and Technology
>>>>>>> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>>>>>>> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
>>>>>>> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
>>>>>>
>>>>>> --
>>>>>> Dr. Axel Kohlmeyer
>>>>>> akohlmey_at_gmail.com http://goo.gl/1wk0
>>>>>>
>>>>>> College of Science and Technology
>>>>>> Temple University, Philadelphia PA, USA.
>>>>
>>>> --
>>>> The University of Edinburgh is a charitable body, registered in
>>>> Scotland, with registration number SC005336.
>>
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>
>

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.