bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't create default pager object


From: Richard Braun
Subject: Re: can't create default pager object
Date: Sun, 18 Mar 2007 23:19:57 +0100
User-agent: Mutt/1.5.9i

On Sun, Mar 18, 2007 at 02:06:01PM -0400, Ben Asselstine wrote:
> Hello,
> 
> In trying to debug tmpfs I have made a small program to illustrate a
> bug I've been experiencing with the default_pager_object interface.
> 
> The call to default_pager_object_create returns -308, which apparently
> means that the server died (EMIG_SERVER_DIED).
> 
> I ran this as a normal user and the permissions on
> /servers/default-pager are wide open.  I get the same error when
> running as root.
> 
> I would appreciate some feedback on this issue, or some pointers about
> how I can debug this.

Here is the output of rpctrace on your test program (slightly modified
with calls to printf() in your code and in the Mig stub code) :

  58->dir_lookup ("servers/default-pager" 4 0) = 0 1 ""   74
  55->io_stat_request () = 0 {14 272 0 0 0 1157749117 0 8397200 1 10018 5 0 0 
1174256253 410000 1174256253 510000 1174256253 510000 512 8 0 0 0 0 0 0 0 0 0 0 
0}
task378->vm_protect (134524928 135168 0 7) = 0 
  70->io_write_request ("DEBUG: default_pager = 21
DEBUG: default_pager = 21
" -1) = 0 26
  74->default_pager_object_create (1234)  76->   71 ();
  70->io_write_request ("DEBUG: OutP->Head.msgh_id = 71
DEBUG: OutP->Head.msgh_id = 71
" -1) = 0 31
task378->mach_port_deallocate (pn{ 21}) = 0 
./pdex:   72->io_write_request ("./pdex: " -1) = 0 8
can't create object of 1234 bytes: err is -308  72->io_write_request ("can't 
create object of 1234 bytes: err is -308" -1) = 0 46
  72->io_write_request ("

" -1) = 0 1
task378->vm_deallocate (134656000 4096) = 0 
task378->vm_map (134656000 4096 0 0  (null) 0 0 0 7 1) = 0 134656000
  60->proc_mark_exit_request (-78848 0) = 0 
task378->task_terminate () = 0 


Here is the output of rpctrace on proxy-defpager :

  51->fsys_getroot (  59 0 0 4)  47->io_restrict_auth_request (0 0) = 0   53
  53->file_check_access () = 0 7
task357->mach_port_allocate (1) = 0 pn{ 36}
task357->mach_port_move_member (pn{ 36} pn{ 22}) = 0 
task357->mach_port_deallocate (pn{ 33}) = 0 
task357->mach_port_request_notification (pn{ 36} 70 1   59) = 0  (null)
reply?  55 > 0 1 ""   55
  55->default_pager_object_create (1234)  45->default_pager_object_create 
(1234) = 0   65
  61->   71 ();
reply?  59 >(70) 0x1 ((os/kern) invalid address) 
task357->mach_port_mod_refs (pn{ 36} 1 -1) = 0 
task357->mach_port_deallocate (pn{ 28}) = 0


The error is returned by the client stub code generated by Mig, in this
code path :

        InP->Head.msgh_id = 2275;

        msg_result = mach_msg(&InP->Head, 
MACH_SEND_MSG|MACH_RCV_MSG|MACH_MSG_OPTION_NONE,
 32, sizeof(Reply), InP->Head.msgh_reply_port, MACH_MSG_TIMEOUT_NONE, 
MACH_PORT_NULL);
        if (msg_result != MACH_MSG_SUCCESS) {
                mig_dealloc_reply_port(InP->Head.msgh_reply_port);
                return msg_result;
        }
        mig_put_reply_port(InP->Head.msgh_reply_port);

        if (OutP->Head.msgh_id != 2375) {
                if (OutP->Head.msgh_id == MACH_NOTIFY_SEND_ONCE)
                return MIG_SERVER_DIED;

2275 is the RPC ID for default_pager_object_create().
MACH_NOTIFY_SEND_ONCE value is 71. So, it looks like the stub code gets
an unexpected notification message on the reply port. I've not managed
to understand the output of rpctrace better than that for now. Hope it
helps.

-- 
Richard Braun

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]