Ask the community
Knowledgeshare | Got a question? - just ask
Every time I load a recording I get loads of lines with messages about loading symbols. I’m not interested, I want them off. How do I disable them? The simplest way to do that is to add the following line to your `.udbinit`: set print symbol-loading offthis will disable the output entirely. If you want a shorter version of the messages but still want to see something the following are the options you have:not running> help set print symbol-loadingSet printing of symbol loading messages.off == turn all messages offbrief == print messages for the executable, and brief messages for shared librariesfull == print messages for the executable, and messages for each shared library.
If I run a reverse operation such as reverse-continue then interrupt it, I will find myself at some point in the recording earlier than I was previously at, but later than the earliest I might have ended up. So far, so expected.If I then repeat the command, is UDB guaranteed to stop at the same point it would have if the original command was not interrupted (because of a breakpoint say), or might it skip that instance and stop at some earlier point in the recording?Put another way, does repeating a reverse command carry on in a human sense, or could some of the search space in the recording be missed? Or do I need to go back to the point where I was before and start the operation all over again?
Currently ugo 1,234 gives an error as you should use ugo time 1,234. Anecdotal evidence shows that even experienced users often forget to spell the full command.It would be possible to make the ugo command smarter when it can infer what the user meant, so ugo 1,234 would be treated as ugo time 1,234 and ugo my-bookmark-name as ugo bookmark my-bookmark-name.To make this work properly we would also need to modify other commands to be more helpful. For instance, if you use ubookmark start to create a bookmark called start, then the command could warn you that you will have to use the full ugo bookmark start form to avoid ambiguity with the ugo start command. (Details on how this would work are still undecided.)
Recently while investigating an issue for a customer I noticed the following: (udb) ugo event prev name=='write'going to: ref=0x1fc054f4c170 in_code=0 time_bbcount=223466223298 time_extra=18446744073709551615 code=write size=80 result=70x00007f4fc89e0c0b in write () from /tmp/undodb.8444.1617966303.9400325.18ca8bac04951ecc/debuggee-1-bamqf2b_/symbol-files/lib64/libpthread.so.0OK(udb) ugo event prev name=='write'going to: ref=0x1fc054f4c0b8 in_code=0 time_bbcount=223466223040 time_extra=18446744073709551615 code=write size=80 result=6[Switching to Thread 12978.12978]0x00007f4fc3843f81 in epoll_wait () from /tmp/undodb.8444.1617966303.9400325.18ca8bac04951ecc/debuggee-1-bamqf2b_/symbol-files/lib64/libc.so.6WHAT?(udb) ugo event prev name=='write'going to: ref=0x1fc0540a8d00 in_code=0 time_bbcount=223403831487 time_extra=18446744073709551615 code=write size=80 result=8[Switching to Thread 12978.13072]0x00007f4fc38367ab in write () from /tmp/undodb.8444.1617966303.9400325.18ca8bac04951ecc/d
In Recording without debugging symbols there are lots of descriptions of actual commands but there is no workflow description.I found out that one of our customers does the following to load the symbols in their recordings: set sysroot /set debug-file-directory /standard/path/to/debug/buildset solib-search-path /standard/path/to/debug/build/libuload <your recording>file /standard/path/to/debug/build/<executable> How do you load the symbols in your recordings?
If, while recording through the API, one of the undolr_stop() or undolr_discard() functions fails (e.g. returns -1), what does that imply for the debugged program?What measures should a programmer take when such failures are met?
I am trying the live debugging guide for java , in intellij an unable to get to workam seeing the following error with my demo project, any help as to what’s going wrong ?18:05:32.962 [main] DEBUG io.undo.jdwp.UdbJVMDebugger - type database created18:05:33.012 [main] ERROR io.undo.jdwp.UdbJDWPBridge - startup errorjava.lang.Exception: Please make sure debug symbols are installed! at io.undo.jdwp.UdbJDWPBridge.<init>(UdbJDWPBridge.java:230) [undo-jdwp-java-1.0.jar:?] at io.undo.jdwp.UdbJDWPBridge.main(UdbJDWPBridge.java:121) [undo-jdwp-java-1.0.jar:?]18:05:33.016 [main] DEBUG io.undo.jdwp.UdbJDWPBridge - agent has been notified on port 4168318:05:33.016 [main] DEBUG io.undo.jdwp.UdbJDWPBridge - wait for JDWP thread to connect
How to use a recording that has no debugging symbols For various reasons you might find yourself recording a program that has been stripped of its symbols or you might want to keep the size of the recording to a minimum and not saving the symbol files is an easy win.BUT.A recording is not like a live process and adding symbols to it in UDB can be somewhat confusing.In this article I’ll explain how to add symbols to a recording in UDB in order to render it usable.This is a quick overview of the most common commands you might wan to use when you need to add symbols to your recording.What’s in your toolboxUDB (and GDB) have several commands that allow you to control all aspects of symbol loading. Let’s take a look.Commands to modify the path where to look for symbolsA running program is composed by (mainly) 2 components: the binary file that constitutes the main application and a number of shared libraries linked into it at runtime.You might therefore face a recording that is lacking symb
Sometimes you want to stop recording a process before it has finished, leave it running and save what’s been recorded so far.for example you might want to reproduce a problem that doesn’t end up in a crash on a production system.Thankfully it is rather easy to stop recording and monitoring when the recording file is stable / complete. There are several processes involved when recording software. Two are relevant for this scenario:live-record nannyI will not explain what these actually do normally. Let’s just say that live-record is the front-end and nanny the back-end.By signalling your intention to the front-end the back-end will do what you want. Signalling the intention to stop recordingThis is achieved by sending a signal to live-record: $ kill -USR1 <pid of live-record> live-record will then tell nanny to stop recording, detach and save the recording to disk. Monitor the recording creation Nanny will start straight away but it might take some time to completely write the rec
This conversation derives from one which started from a related idea.@Bruce wrote:@david_griffiths Your “signature” idea is similar to one that’s been floating around for a while (pre-dating this community otherwise I’d share a link) around byte-counting.The concept, as I’ve always understood it, is that we would match up corresponding file descriptors in two processes, and set a point in each recording where the exchange of data is in sync. From that point we can inspect reads and writes and by counting bytes exactly correlate the flow of bytes between those recordings. There’s a little more work to set the initial “in-sync” point when the fds aren’t opened within the recording, but if you get that alignment then no fuzziness would be required.This approach might actually be best for you if you want to fully-automate your navigation in twin recordings, but it feels like the improvement to recording wallclock resolution could be very useful in manual navigation relatively cheaply. @d
In this thread https://community.undo.io/ideas/script-to-automatically-load-symbols-in-recordings-102I discussed how to load symbols and it involved a few UDB commands and a somewhat awkward workflow. I then spent some time trying to figure out a better way to go around this and finally came up with a script that is rather terse. You can find it here The beauty of this script is that it will allow for a much simpler workflow: $ udb <recording>......start 1> source /path/to/automatic_symbol_loading.pystart 1> load-all-symbols /path/to/dir/with/symbolsLoading separate debug info for libwatchdog.so from /path/to/dir/with/symbols/lib/libwatchdog.so.debugLoading separate debug info for libunwind.so from /path/to/dir/with/symbols/lib/libunwind.so.debug...start 1> If you want you can also add the sourcing to your `.udbinit` in order to have the command loaded every time you invoke UDB. The only thing you will need to be aware of is the fact that the script will load all the sym
A lot of people use the good old DDD as a graphical user interface to GDB and they would like to continue using it with UDB as well. The good news is that up to version 6.3 it “just worked”, you could launch DDD with$ ddd --debugger udb <args>and you would find yourself in the familiar environment you are so used to. The “bad” news is that from version 6.4 Undo introduced a nice feature (if you use UDB directly) that disrupted DDD: the smart prompt. This made DDD unable to show the source code of the program being debugged: DDD not showing the source code because of the new prompt DDD relies on the prompt being something it knows in order to work with UDB so having something that changes constantly is not exactly good. Thankfully the answer is surprisingly simple: you can set the prompt back to `(gdb) ` (beware of the space after the closing bracket!!) with the following line in your `.udbinit`: set prompt (gdb) I now have a working DDD again: DDD showing the source code thanks t
Particularly for the benefit of new users, it might be useful to have a “Tip of the day” feature which gives suggestions like “use ugo end to get to the end of a recording, rather than continue”.I think it makes sense to restrict this to running once at UDB startup, or when run/attach/uload is used; to show suggestions in the middle of a session would be too obtrusive.
Hi, Am not able to record a process, not sure why it is not able to do so. can you please help on how to debug it.[root@VM-228 undo-6.6.0-dev.850b22880926]# ./live-record -p 11027live-record: Termination recording will be written to /opt/cfg/undo-6.6.0-dev.850b22880926/11027-2022-05-14T16-57-41.771.undo if requiredlive-record: Maximum event log size is 1GError: Cannot enable recordinglive-record: No child processes (-10:ECHILD) Thank you,Rajesh
Magento 2 store owners might be familiar with the backend grids and how they can be exported to CSV files. The store admins are frequently required to export the data into CSV format for multiple purposes.There can be custom columns in the backend grid that the admin may also want to include in the exported CSV file. However, sometimes you may face problem to include the custom column in export to the CSV file in Magento 2, which may put the store admin in a troubling situation.Suppose you are a Magento 2 store owner selling food items and have added a custom product attribute for flavours, then you may face difficulties while exporting products grid along with the newly created product attribute.The solution to deal with such an issue is to tweak the source codes. You can learn the complete solution at https://meetanshi.com/blog/include-custom-column-in-export-to-csv-in-magento-2/
Already have an account? Login
Login to the community
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.