Re: Please help me diagnose this crazy VMWare/FreeBSD 8.x crash
On Fri, 30 Mar 2012 19:49:54 -0500, Adrian Chadd adr...@freebsd.org wrote: There's no guarantee that upgarding a VM or rebooting it won't change the config of said VM. Don't forget to diff the vm config file.. I'm not sure how this would be accomplished Am I supposed to be running backup software (rsync, etc?) on my ESX nodes now so I can capture these VM config files? How would I ever know what changed the VM files when? I'm sure if I called up VMWare and said HEY YOU GUYS YOU BROKE THIS BY CHANGING THESE FILES and then when they asked how I figured it out I told them I installed software that is definitely unsupported on their ESXi server to track it that they would certainly tell me to go pound sand. Working in a black box environment is never fun. :( ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
HEADSUP: Call for FreeBSD Status Reports - 1Q/2012
Dear all, I would like to remind you that the next round of status reports covering the first quarter of 2012 are due on April 15th, 2012. As this initiative is very popular among our users, I would like to ask you to submit your entry as soon as possible, so that we can compile the report in a timely fashion. Do not hesitate and write us a few lines; a short description about what you are working on, what your plans and goals are, or any other information that you may consider interesting is always welcome. This way we can inform our community about your great work! Check out the reports from the past to get some inspiration of how your submission might look like. If you know about a project that should be included in the status report, please let us know as well, so we can poke the responsible people to provide us with something useful. Updates to submissions from the previous reports are welcome too. Note that the submissions are accepted from anyone involved within the FreeBSD community, you do not have to be a FreeBSD committer. Anything related to FreeBSD can be covered. Please email us the filled-in XML template which can be found at http://www.freebsd.org/news/status/report-sample.xml to mont...@freebsd.org, or alternatively use our web based form located at http://www.freebsd.org/cgi/monthly.cgi. For more information, please visit http://www.freebsd.org/news/status/. We are looking forward to see your submissions! Thanks. -- Kind regards Daniel Gerzo ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Is there any modern alternative to pstack?
I look at seemingly abandoned sysutils/pstack, last modified upstream 2002-11-27. It doesn't really work on 9.0 i386, prints some errors. It's functions, though, is quite desirable if one wants to understand why some multithreaded program hangs or is not responsive. Since there were no updates, I wonder, is this because there is some alternative in FreeBSD that I don't know about, or it is primarily due to the lack of interest/resources? I don't take gdb as alternative since it is not single line, and also it has some threading issues of its own. Yuri ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: Is there any modern alternative to pstack?
procstat(1) On Sat, Mar 31, 2012 at 12:41:41PM -0700, Yuri wrote: I look at seemingly abandoned sysutils/pstack, last modified upstream 2002-11-27. It doesn't really work on 9.0 i386, prints some errors. It's functions, though, is quite desirable if one wants to understand why some multithreaded program hangs or is not responsive. Since there were no updates, I wonder, is this because there is some alternative in FreeBSD that I don't know about, or it is primarily due to the lack of interest/resources? I don't take gdb as alternative since it is not single line, and also it has some threading issues of its own. Yuri ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org -- ;s =; ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
Re: __NR_mmap2 in FreeBSD
Thanks. I've tried this. Still getting some allocation problems. if (temp_regs.r_eax != addr) warn(Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.,addr,temp_regs.r_eax); What can I do? Please help. void map_memory(unsigned long addr, unsigned long size, int flags) { int status; struct reg regs,temp_regs; unsigned long int_instr = 0x80cd; /* INT 0x80 */ printf(%x\n,addr); //addr=addr0x; if (ptrace(PT_GETREGS,exec_pid,(caddr_t)regs,0) 0) die_perror(ptrace(PTRACE_GETREGS,%d,(caddr_t)regs,0),exec_pid); /* mmap2 system call seems to take arguments as follows: * eax = __NR_mmap2 * ebx = (unsigned long) page aligned address * ecx = (unsigned long) page aligned file size * edx = protection * esi = flags * Other arguments (fd and pgoff) are not required for anonymous mapping */ temp_regs = regs; //printf(temp=%u,\teip=%u\tregs=%u\teip=%u\n,temp_regs,temp_regs.r_eip,regs,regs.r_eip); // temp_regs.r_eax = __NR_mmap2; temp_regs.r_eax=71; /*temp_regs.r_ebx = addr; temp_regs.r_ecx = size; temp_regs.r_edx = flags; temp_regs.r_esi = MAP_PRIVATE | MAP_ANONYMOUS;*/ //push size //temp_regs.r_eip = temp_regs.r_esp - 4; //printf(temp=%u,\teip=%u\tregs=%u\teip=%u\n,temp_regs,temp_regs.r_eip,regs,regs.r_eip); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-4),addr) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed ADDER,exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-8),size) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed size,exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-12),flags) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed protections,exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-16),MAP_PRIVATE|MAP_ANON|MAP_FIXED) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed flags,exec_pid,temp_regs.r_esp); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-20),-1) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed ADDER,exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-24),0) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed offset1,exec_pid,temp_regs.r_esp,addr); if (ptrace(PT_WRITE_D,exec_pid,(void *)(temp_regs.r_esp-28),0) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,0x%.8x) failed offset1,exec_pid,temp_regs.r_esp,addr); /* if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x80cd) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory,exec_pid,temp_regs.r_eip); */ if (ptrace(PT_WRITE_I,exec_pid,(void *)(temp_regs.r_eip),0x80cd) 0) die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while allocating memory,exec_pid,temp_regs.r_eip); //temp_regs.r_eip = temp_regs.r_esp - 32; temp_regs.r_esp = temp_regs.r_esp - 28; if (ptrace(PT_SETREGS,exec_pid,(caddr_t)temp_regs,0) 0) { die_perror(ptrace(PT_SETREGS,%d,...) failed while allocating memory,exec_pid); } if (ptrace(PT_STEP,exec_pid,NULL,0) 0) die_perror(ptrace(PT_STEP,...) failed while executing mmap2); wait(status); if (WIFEXITED(status)) die(Restarted process abrubtly (exited with value %d). Aborting Restart.,WEXITSTATUS(status)); else if (WIFSIGNALED(status)) die(Restarted process abrubtly exited because of uncaught signal (%d). Aborting Restart.,WTERMSIG(status)); if (ptrace(PT_GETREGS,exec_pid,(caddr_t)temp_regs,0) 0) { die_perror(ptrace(PT_GETREGS,...) failed after executing mmap2 system call); } //fprintf(stdout,hello iam here \n); if (temp_regs.r_eax != addr) warn(Wanted space at address 0x%.8x, mmap2 system call returned 0x%.8x. This could be a problem.,addr,temp_regs.r_eax); else if (cr_options.verbose) fprintf(stdout,Successfully allocated [0x%.8lx - 0x%.8lx]\n,addr,addr+size); /* Restore original registers */ if (ptrace(PT_SETREGS,exec_pid,(caddr_t)temp_regs,0) 0) { die_perror(ptrace(PT_SETREGS,...) when restoring registering after allocating memory (mmap2)); } } On 29 March 2012 19:14, John Baldwin j...@freebsd.org wrote: On Thursday, March 29, 2012 9:15:43 am Maninya M wrote: Thanks a lot for replying! Ok I've tried this to push arguments onto stack. Is it right? I get an error at this line: die_perror(ptrace(PT_WRITE,%d,0x%.8x,INT 0x80) failed while dasfallocating memory,exec_pid,temp_regs.r_eip); Please tell me what to do. void map_memory(unsigned long addr, unsigned long size, int flags) { int status; struct reg regs,temp_regs; unsigned long int_instr = 0x80cd; /* INT 0x80 */ if (ptrace(PT_GETREGS,exec_pid,(caddr_t)regs,0) 0) die_perror(ptrace(PTRACE_GETREGS,%d,(caddr_t)regs,0),exec_pid); /* mmap2 system call seems to take arguments as follows: * eax = __NR_mmap2 * ebx = (unsigned long) page
Re: Is there any modern alternative to pstack?
On 03/31/2012 14:22, Jason Hellenthal wrote: procstat(1) I don't see which key of procstat(1) displays this information. The closest key is: -k Display the stacks of kernel threads in the process It shows kernel threads, but no user space stacks. How can I get user space stacks? Yuri ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org