Advertisement
Guest User

Untitled

a guest
Jul 21st, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.44 KB | None | 0 0
  1. 1.
  2. ```
  3. $ crashsim -- myapp -t -v -l 100
  4. Recording myapp...
  5. ###################################################### 100%
  6. Analyzing recording...
  7. ###################################################### 100%
  8. Simulating...
  9. ###################################################### 100%
  10.  
  11. Results:
  12. 1. myapp may behave unexpectedly when running in Linux environments where "example.txt" is not a regular file.
  13. 2. myapp may encounter long delays in Linux environments with slow network connections
  14. because it does not supply a timeout value to poll().
  15. 3. myapp does not prevent "anotherfile.log" from being modified while copying it across disks in a multi-disk environment.
  16.  
  17. Use crashsim explain <report number> for a more detailed explaination...
  18.  
  19. $ crashsim explain 1
  20. Detailed Explaination of report no. 1
  21. Message: "myapp may encounter problems in Linux environments where "example.txt" is not a regular file."
  22.  
  23. CrashSimulator has identified that myapp does not recognize situations where it has been simulated
  24. that "example.txt" is not a regular file. This is problematic in Linux environments where "example.txt"
  25. is supplied by (or may be manipulated by) myapp's user. myapp should be modified to use a call from the
  26. "stat" family to gather information about "example.txt" before processing it. Failure to do so could
  27. result in myapp crashing, hanging, or exhausing system resources.
  28.  
  29. This report was made because CrashSimulator identified the following issues:
  30. (At Event 120): myapp doesn't recognize when "example.txt" is a character device
  31. (At Event 120): myapp doesn't recognize when "example.txt" is a block device
  32. (At Event 120): myapp doesn't recognize when "example.txt" is a symlink device
  33. These issues were found by: "Unusual Filetype Mutator"
  34.  
  35. Use crashsim debug 1 to launch a debugger at this point in execution.
  36. $ crashsim debug 1
  37. Launching rr and fast-forwarding to event 120...
  38.  
  39. For help, type "help".
  40. Type "apropos word" to search for commands related to "word".
  41. (rr)
  42. ```
  43. 2.
  44. ```
  45. crashsim
  46.  
  47. usage: crashsim [-h] [-v] [-e EXPLAIN [EXPLAIN ...]] [-d DEBUG [DEBUG ...]]
  48. [-n NAME] [-m MUTATOR [MUTATOR ...]] [-f FORCE]
  49. [myapp]
  50.  
  51. positional arguments:
  52. myapp the application to be tested
  53.  
  54. optional arguments:
  55. -h, --help show this help message and exit
  56. -v, --verbosity flag for displaying debug information
  57. -e EXPLAIN [EXPLAIN ...], --explain EXPLAIN [EXPLAIN ...]
  58. explain the reports in more detail
  59. -d DEBUG [DEBUG ...], --debug DEBUG [DEBUG ...]
  60. lets the user to identify exactly where the bug is
  61. -n NAME, --name NAME optinal name for the test
  62. -m MUTATOR [MUTATOR ...], --mutator MUTATOR [MUTATOR ...]
  63. define the mutator to be applied to the test, if no
  64. mutator given then a default set will be run.
  65. -f FORCE, --force FORCE
  66. force overwrite create of the test
  67.  
  68. crashsim ./test/calltime
  69.  
  70. Creating test for calltime using name autotest1.
  71. Mutator used: Reverse time mutator, Future time mutator, Cross disk rename mutator, Null mutator, Fsync no space mutator.
  72. (To use custom mutator, use “crashsim -m “<mutator 1>” “<mutator 2>” -- ./test/calltime”)
  73. ……..
  74.  
  75. Following issues has been detected:
  76. calltime may not detect anomalies when the system clock has been skewed back 100 seconds.
  77. calltime may not detect anomalies when the system clock has been skewed forward 100 seconds.
  78.  
  79. For a more detailed report, use “crashsim explain <report number>”
  80. (If you created any other test after this one, use “crashsim explain -n “autotest1” <report number>”)
  81.  
  82. crashsim explain 1
  83.  
  84. In test autotest1, anomaly report for report number 1 is as follows:
  85.  
  86. calltime may not detect anomalies when the system clock has been skewed back 100 seconds.
  87.  
  88. It has been identified that calltime does not run into any unexpected behavior when the system clock has been skewed back 100 seconds. This could cause some unexpected error when dealing with time sensitive information.
  89.  
  90. To see which systemcalls has caused this anomaly, use “crashsim history <report number>”
  91. (If you created any other test after this one, use “crashsim history -n “autotest1” <report number>”)
  92.  
  93. crashsim history 1
  94.  
  95. In test autotest1, report number 1 occurred at the following system calls:
  96.  
  97. --------------------------------------------------
  98. ---> Reached target process 22587 at event 217.
  99. --------------------------------------------------
  100. Reading symbols from /usr/local/bin/../lib/rr/librrpreload.so...done.
  101. Reading symbols from /lib/i386-linux-gnu/libselinux.so.1...(no debugging symbols found)...done.
  102. Reading symbols from /lib/i386-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/libc-2.23.so...done.
  103. done.
  104. Reading symbols from /lib/i386-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/libdl-2.23.so...done.
  105. done.
  106. Reading symbols from /lib/i386-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug/.build-id/51/ddb6090511af5615d5f4af155a4403d2845346.debug...done.
  107. done.
  108. Reading symbols from /lib/i386-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
  109. Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/ld-2.23.so...done.
  110. done.
  111. 0x70000002 in ?? ()
  112. (rr)
  113. ```
  114. 3.
  115. ```
  116. $ crashsim -n ‘myapp’ -- <app> <parameters>
  117.  
  118. output:
  119. myapp could not recognize that some files were not a regular file type when myapp was opening those files.
  120. myapp could not recognize that the clock moved forward in some situations.
  121. myapp could not recognize that the clock moved backward in some situations.
  122. myapp could not prevent some files from being modified when they were moved cross disk.
  123. # Only one message for one mutator
  124.  
  125. Use ‘crashsim explain <report number>’ for detailed information about the report.
  126.  
  127.  
  128.  
  129. $ crashsim explain 1
  130.  
  131. output:
  132. This report was made because UnusualFiletypeMutator found the following issues:
  133. (At event <No>): myapp could not recognize that ‘<filename>’ is not a regular file.
  134. (At event <another No>): myapp could not recognize that ‘<filename>’ is not a regular file.
  135. # list all errors the mutator found
  136.  
  137. myapp should be modified to use a call from the "stat" family to gather information about ‘<filename>’ before processing it.
  138. # Maybe cut down some explanation and just print some advice.
  139.  
  140. Use ‘crashsim debug --report 1 --event <No>’ to debug specific event.
  141.  
  142.  
  143.  
  144. $ crashsim debug --report 1 --event 120
  145.  
  146. output:
  147. Launching debugger for report 1 at event 120...
  148. --------------------------------------------------
  149. ---> Reached target process 22587 at event 120.
  150. --------------------------------------------------
  151. Reading symbols from /usr/local/bin/../lib/rr/librrpreload.so...done.
  152. Reading symbols from /lib/i386-linux-gnu/libselinux.so.1...(no debugging symbols found)...done.
  153. Reading symbols from /lib/i386-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/libc-2.23.so...done.
  154. done.
  155. Reading symbols from /lib/i386-linux-gnu/libdl.so.2...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/libdl-2.23.so...done.
  156. done.
  157. Reading symbols from /lib/i386-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug/.build-id/51/ddb6090511af5615d5f4af155a4403d2845346.debug...done.
  158. done.
  159. Reading symbols from /lib/i386-linux-gnu/libpcre.so.3...(no debugging symbols found)...done.
  160. Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug//lib/i386-linux-gnu/ld-2.23.so...done.
  161. done.
  162. 0x70000002 in ?? ()
  163. (rr)
  164. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement