OpenVZ Forum


Home » Mailing lists » Devel » [IA64] unwind did not work for processes born with CLONE_STOPPED
[IA64] unwind did not work for processes born with CLONE_STOPPED [message #11320] Mon, 19 March 2007 10:50 Go to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

[IA64] unwind did not work for processes born with CLONE_STOPPED

Minor problem for mainstream. Big problem for CPT, because all the
stopped/traced processes are born in this state, hence they cannot
be checkpointed again due to failing unwind.

The problem was identified as assumption in kernel unwind library
that top level frame is different of syscall frame. It is the case
unless process was born with CLONE_STOPPED.

Author: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-Off-By: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-Off-By: Kirill Korotaev <dev@sw.ru>

--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -60,6 +60,7 @@ #ifdef UNW_DEBUG
# define UNW_DEBUG_ON(n) unw_debug_level >= n
/* Do not code a printk level, not all debug lines end in newline */
# define UNW_DPRINT(n, ...) if (UNW_DEBUG_ON(n)) printk(__VA_ARGS__)
+# undef inline
# define inline
#else /* !UNW_DEBUG */
# define UNW_DEBUG_ON(n) 0
@@ -1943,9 +1944,9 @@ EXPORT_SYMBOL(unw_unwind);
int
unw_unwind_to_user (struct unw_frame_info *info)
{
- unsigned long ip, sp, pr = 0;
+ unsigned long ip, sp, pr = info->pr;

- while (unw_unwind(info) >= 0) {
+ do {
unw_get_sp(info, &sp);
if ((long)((unsigned long)info->task + IA64_STK_OFFSET - sp)
< IA64_PT_REGS_SIZE) {
@@ -1963,7 +1964,7 @@ unw_unwind_to_user (struct unw_frame_inf
__FUNCTION__, ip);
return -1;
}
- }
+ } while (unw_unwind(info) >= 0);
unw_get_ip(info, &ip);
UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n",
__FUNCTION__, ip);
Re: [IA64] unwind did not work for processes born with CLONE_STOPPED [message #11324 is a reply to message #11320] Mon, 19 March 2007 12:34 Go to previous messageGo to next message
Christoph Hellwig is currently offline  Christoph Hellwig
Messages: 59
Registered: April 2006
Member
On Mon, Mar 19, 2007 at 02:04:20PM +0300, Kirill Korotaev wrote:
> [IA64] unwind did not work for processes born with CLONE_STOPPED
>
> Minor problem for mainstream. Big problem for CPT,

What is CPT?
Re: [IA64] unwind did not work for processes born with CLONE_STOPPED [message #11326 is a reply to message #11324] Mon, 19 March 2007 12:51 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

Christoph Hellwig wrote:
> On Mon, Mar 19, 2007 at 02:04:20PM +0300, Kirill Korotaev wrote:
>
>>[IA64] unwind did not work for processes born with CLONE_STOPPED
>>
>>Minor problem for mainstream. Big problem for CPT,
>
>
> What is CPT?

It is checkpointing/restore feature from OpenVZ.
Sorry for confusion in the comment.

Kirill
Previous Topic: [PATCH 1/2] fs: remove duplicated iovec checking code v8
Next Topic: [PATCH v5] Fix rmmod/read/write races in /proc entries
Goto Forum:
  


Current Time: Wed Apr 24 19:05:23 GMT 2024

Total time taken to generate the page: 0.01325 seconds