From: SourceForge.net <no...@so...> - 2010-03-11 23:06:04
|
Bugs item #2968895, was opened at 2010-03-11 20:29 Message generated for change (Comment added) made by assarbad You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=2968895&group_id=16191 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Oliver Schneider (assarbad) Assigned to: Nobody/Anonymous (nobody) Summary: Recurrence of bug 1930788 Initial Comment: The symptoms are identical, the version is 0.9.6 (I used the source package and compiled on Debian Lenny with all updates installed). I'm currently trying to track it down in GDB, but it seems to be a hard nut to crack, since the reason appears to be a C++ exception "somewhere". NB: bug 1930788 was closed and there doesn't seem to be a method to open it as bug reporter. Probably that is only allowed for tracker admins. ---------------------------------------------------------------------- >Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 23:06 Message: BTW: the "opcontrol --reset" removed whatever the offending item in the samples folder was. I still have the original contents in a .tgz file, just in case. ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 23:00 Message: In the source tree of 0.9.6 as in the tar.gz I ran this grep -n -R '\.size\(\)' ./*|grep '-'|grep --color '\.size\(\)' to see further potential candidates prone to the same issue. I didn't check the context of each of them, though. However, this one also looks a bit suspicious: ./libutil++/string_manip.cpp:132: formatted.erase(formatted.size() - 1); // Oliver ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 22:55 Message: Yeah well, so much for nice formatting. The indentation in my previous post got swallowed, apparently. ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 22:52 Message: Hi again, here's when the crash happens ;) ... parse_filename.cpp: 77 /// Handle an anon region. Pretty print the details. 78 /// The second argument is the anon portion of the path which will 79 /// contain extra details such as the anon region name (unknown, vdso, heap etc.) 80 string const parse_anon(string const & str, string const & str2) 81 { 82 string name = str2; 83 // Get rid of "{anon: 84 name.erase(0, 6); 85 // Get rid of the trailing '}' 86 name.erase(name.size() - 1, 1); 87 vector<string> parts = separate_token(str, '.'); 88 if (parts.size() != 3) 89 throw invalid_argument("parse_anon() invalid name: " + str); ... >From what I see the problem is this: name.erase(name.size() - 1, 1); GDB allows to call functions inside the running program and a call to name.size() at that point gave me a return value of 0, so the call was name.erase(-1, 1) ... it never reached the next line (87) after that. I did have an older version of oprofile running before, but it gave me the same error. The files *could* be remnants from that time. However, I think that the size of the string should be checked after the erase() call on line 84 and before calling it again on line 86. I'll try to attach a file that details what I was doing in GDB. // Oliver ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 22:23 Message: Hi there, thanks for your reply. Reset will remove all the current sample files, right? So it'd be wise to create a backup in case the reset removes the symptom. After all the program shouldn't probably crash like that. Anyhow I'm getting pretty close in GDB. I was able to set a bpx on basic_string.h:1133 (which is the erase member function) and will see whether I get a usable stack backtrace this time. ---------------------------------------------------------------------- Comment By: Maynard Johnson (maynardj) Date: 2010-03-11 21:44 Message: This is unlikely to be the exact same problem as bug #1930788. I assume you're seeing the same high-level symptom of "opreport error: basic_string::erase" -- correct? If you do 'opcontrol --reset' and re-run the profile, are you still seeing this problem? If so, please do 'opreport -l --verbose=all' and direct the output to a file. Look into the file to see the last messages printed before the error. Hopefully, that will give us something to go on since gdb doesn't seem to help. ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 21:08 Message: A problem seems to be that GDB 6.8 gets derailed by the exception somehow. I'm unable to proceed until after profile_spec::generate_file_list() as called on line 256 in opreport_options.cpp and when trying to set a bpx there everything goes foobar. ---------------------------------------------------------------------- Comment By: Oliver Schneider (assarbad) Date: 2010-03-11 20:39 Message: Okay, the problem seems to come from the handle_options call on line 500 in opreport.cpp. btw: I'm running it with "opreport -l" ... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116191&aid=2968895&group_id=16191 |