#48 closed defect (fixed)

chroot behavior on delete

Reported by: Joel Sherrill Owned by: Jennifer Averett
Priority: normal Milestone: 2
Component: fs Version: unknown
Severity: major Keywords:
Cc: bugs@…, joel.sherrill@…, correo@… Blocked By:
Blocking:

Description

I found some strange effect using chroot() in RTEMS
application. Some errors occure when I try do delete task wich used
chroot() function. Is it normal

Release:
ss-20010816

Environment:
duplicated on pc386 and simsh4 BSPs

How-To-Repeat:
Run test I assume :)

Attachments (1)

chroot_test.tgz (1.2 KB) - added by Joel Sherrill on Dec 3, 2006 at 1:31:12 PM.
chroot_test.tgz

Download all attachments as: .zip

Change History (3)

comment:1 Changed on Oct 26, 2001 at 8:51:46 PM by Joel Sherrill

From: Joel Sherrill <joel.sherrill@…>
To: correo@…
Cc: bugs@…, joel@…, Jennifer <jennifer@…>,

dedekind@…

Subject: Re: filesystem/48: chroot behavior on delete
Date: Fri, 26 Oct 2001 16:51:46 -0500

Fernando RUIZ CASAS wrote:

Hi.

chroot() forces the call to new libio_private_env() because a new copy
of rtems_filesystem_root variable is necesary.

This snapshot (ss-20010816) doesn't contain the task delete patch.
The task var delete at the delete task step crashs the same manner that
when the telnetd closes the task whether the client closes the session.


Thanks Fernando. I was just out of sync on the impact of the dtor
patch. I will go ahead and close the bug report.


The tasks.c file:
rtems-ss-20010816\c\src\exec\rtems\src\tasks.c


...
/*PAGE

*

  • _RTEMS_tasks_Delete_extension *
  • This extension routine is invoked when a task is deleted. */

User_extensions_routine _RTEMS_tasks_Delete_extension(

Thread_Control *executing,
Thread_Control *deleted

)
{

rtems_task_variable_t *tvp, *next;

/*

  • Free per task variable memory */

tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {

next = tvp->next;
if (tvp->dtor)

(*tvp->dtor)( tvp->ptr ); <========== HERE replaces by

(*tvp->dtor)( *tvp->ptr )

if (executing == deleted)

*tvp->ptr = tvp->gval;

_Workspace_Free( tvp );
tvp = next;

}

/*

  • Free API specific memory */

(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;

}
...


The new snapshot rtems-ss-20011017\c\src\exec\rtems\src\tasks.c
contains the patch.

Sorry but the Outlook can't save the attachment like file.
I can't try it but I can imaginate it.

Fernando RUIZ CASAS
home: correo@…
work: fernando.ruiz@…


De: joel@… joel@…
Enviado el: viernes, 26 de octubre de 2001 15:27
Para: bugs@…
CC: correo@…
Asunto: filesystem/48: chroot behavior on delete

Number: 48
Category: filesystem
Synopsis: chroot behavior on delete
Confidential: no
Severity: serious
Priority: high
Responsible: jennifer
State: open
Class: sw-bug
Submitter-Id: net
Arrival-Date: Fri Oct 26 08:30:00 CDT 2001
Closed-Date:
Last-Modified:
Originator: dedekind@…
Release: ss-20010816
Organization:
Environment:

duplicated on pc386 and simsh4 BSPs

Description:

I found some strange effect using chroot() in RTEMS
application. Some errors occure when I try do delete task wich used
chroot() function. Is it normal

How-To-Repeat:

Run test I assume :)

Fix:

May be related to recent task var dtor change

Release-Note:
Audit-Trail:
Unformatted:


Content-Type: application/octet-stream; name="chroot_test.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="chroot_test.tgz"

H4sIABtd2TsAA+1XbW+iWBTu1zXxP9xtO1Ppi2J9aeKsk1DElimI4eKm3WxCKF4dtg
gOYHdM0/++
h3tBqaudSWrbbJYnDcJ5ec6551wOt/bXwPcjMyJhVNl5JfB8nT87a8Avz1cbVfZbr9
PfBDv8Wa3Z
PG0066e1Hb56WgMRarxWQlnMwsgKENr5yyfu83YkCN8iobeFnem/at2RkeOSbcfgqz
zfbNY39b9a
Oztb9L9Wa+7Ekgb0n992IuvwP++/0ukqwgVGR2108s3zXce7syfDEJ0YqFxJn+j2KB
b24A+hdJfQ
51SoG5KKTVW4krqyIpl9wbhEToii+dSxLdedo5BEyPGQ5SHi3TuB702IF6F7K3Cs2w
WXdC2J7ck8
jBzbCSdl8h0U/Qu1vf8g6OLlY2W/FFtwNCzyp5Hje5aLJpZnj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z0+4osCoas9VIfRQP61GOdD/xXIG
uLstJDPwx5
UZf7hqanFW6s8xxgWKvaxaaAzXMBHmJnfINhfdlQbIXipSReSbqp9ahucRawfW8Ehu
zQ8d5Hphw5
cuTIkSNHjhw5cuTIkSNHjhw5cuT4T+AfmTd?/0wAoAAA=


--
Joel Sherrill, Ph.D. Director of Research & Development
joel@… On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805

Support Available (256) 722-9985

comment:2 Changed on Oct 26, 2001 at 8:53:00 PM by Joel Sherrill

Status: assignedclosed

Changed on Dec 3, 2006 at 1:31:12 PM by Joel Sherrill

Attachment: chroot_test.tgz added

chroot_test.tgz

Note: See TracTickets for help on using tickets.