From: hema sai chandra <prasadsai97@gmail.com>
To: tomaszx.kulasek@intel.com, ian.betts@intel.com
Cc: users@dpdk.org, dev@dpdk.org
Subject: [dpdk-dev] segmentation fault in lthread_run() on ARM64 processor - regarding
Date: Tue, 11 Feb 2020 15:46:27 +0530 [thread overview]
Message-ID: <CAPkOEeEyaJDjr+Le6=R20Hp1YJb4fhPa570TgeaR5CrVLi2F1w@mail.gmail.com> (raw)
Hi,
I am trying to launch a function called lthread_init(), on a logical
core using rte_eal_remote_launch from main (), then creating an lthread
which has only lthread_exit() in the thread body and lthread_run() in the
lthread_init() and then calling a function lthread_main_spawner() from
main(), which creates an lthread (lthread_spawner ) and a scheduler
lthread_run (), this lthread_spawner() creates three more lthreads, you can
see the code below
main ()
{
/** rte_eal_init () and other necessary initialisations */
....
rte_eal_remote_launch ( lthread_init, NULL, 2);
lthread_main_spawner(NULL);
}
static int lthread_init ( void *arg )
{
struct lthread *lt;
lthread_create ( <, -1, lthread_start, NULL );
lthread_run();
return 0;
}
static void *lthread_start ( void *args )
{
....
lthread_exit( NULL );
return NULL;
}
static int lthread_main_spawner ( void *arg )
{
struct lthread *lt;
lthread_create ( <, -1, lthread_spawner, NULL );
lthread_run();
return 0;
}
static void *lthread_spawner ( void )
{
struct lthread *lt1, *lt2, *lt3;
lthread_create ( <1, -1, fun1, NULL );
lthread_create ( <2, -1, fun2, NULL );
lthread_create ( <3, -1, fun3, NULL );
lthread_sleep ( 1000 );
lthread_join ( lt1, NULL );
lthread_join ( lt2, NULL );
lthread_join ( lt3, NULL );
return NULL;
}
void fun1 ()
{
while ( 1)
{
printf (" in lthread 1 \n");
lthread_yield();
}
}
void fun2 ()
{
while ( 1)
{
printf (" in lthread 2 \n");
lthread_yield();
}
}
void fun3 ()
{
while ( 1)
{
printf (" in lthread 3 \n");
lthread_yield();
}
}
the code is working fine in x86 systems but it is getting segmentation
fault on ARM64 processor with 4 logical cores at ctx_switch () function in
_lthread_resume() which is called from lthread_run() function.
I even tried just creating an lthread in a function called from
rte_eal_remote_launch(), but i am getting the same issue
Can you please help me in debugging the issue, is there any implementation
changes need to be done ?
Thanks and Regards,
Hemasai.
reply other threads:[~2020-02-12 18:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPkOEeEyaJDjr+Le6=R20Hp1YJb4fhPa570TgeaR5CrVLi2F1w@mail.gmail.com' \
--to=prasadsai97@gmail.com \
--cc=dev@dpdk.org \
--cc=ian.betts@intel.com \
--cc=tomaszx.kulasek@intel.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).