From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9860A0535; Wed, 12 Feb 2020 19:42:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E8B941BF99; Wed, 12 Feb 2020 19:42:27 +0100 (CET) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by dpdk.org (Postfix) with ESMTP id 684202BE9; Tue, 11 Feb 2020 11:16:39 +0100 (CET) Received: by mail-il1-f180.google.com with SMTP id s18so2984399iln.0; Tue, 11 Feb 2020 02:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=BwOJraL6+8rXDlSeCMtHUEMOdxghbIi1//MmP1VqNbo=; b=cVoFU3cc7TyuXgU6MmNz5vWO3HboCc4/HRwUmqeiPR87QbEO+GYdjNjH0eVftrjb1Z rV1v965as4O2j7iJq0X3CQCteLU2aorn71swiNKkURfMPPSPdGsNJYhuPv2ML56Ilm6P zgvR2ugKvRYj4HR4ZWacxcNu3c3pY2DjF6vfUaVF6LTNQaUvRNgO84jHYJbNEu9gWI7p pvNfchEwxzDqf8lr6QA9ESoCnsipWIDZ5SZAQqhACSJIJQAkVOyyQusnNmJt9gFUc7ZP Pk9SQlmBWbqpZrjSPXAYO5FZ8VX+Uv22b4U/xkL/bZSKftu9LsmFZFTYZ5fbX9TZP9/g cDow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=BwOJraL6+8rXDlSeCMtHUEMOdxghbIi1//MmP1VqNbo=; b=CeS26jGurbUn97AEqRdPw06rm5P1rkxN2GZ7xAjmb2aratqqB13DmFEb5opyqovKHO qhWT58nWStveDTaQRZJ591gid5ORDzkyoftbKVS/oT9A/XREmGAzOk/Va4852nAg5DSr 6r1BQPJgOQKHH0yEEJc2P3qHc/aS4SyeVBuRfVEBhCwtV2/5itjdfbiDMzBmrMSm37bh ZkvYuTiAXL5+BNi3Wz9/d5hhD5wlBZv+hmhT7jYRRIohNdZjpzZbGsJEDkrCxfymw1VV ns0LdOvAEK6Mha5qcA835DVsfbiz6oJKUB7dF2EgO5k4aU4NxQ4xggiq8CoHWZqYi/kS 6+3g== X-Gm-Message-State: APjAAAWejYDiOzoiqdoxNqO98dOXcUx9sRjm1qRUSXDpx1JjoG0GmNJR C92RisvtTLrfDpA1KhF0la4gPMklyrByLcQODKs= X-Google-Smtp-Source: APXvYqz7hLNfGWa9fpNpC6JB4HrLPkQbtcCfUx+oaFt9gKi8EJpCMMdyrcaEY4Byuji2pc1IJBNbbybEo2hS4NmV6M0= X-Received: by 2002:a92:c986:: with SMTP id y6mr5633588iln.186.1581416198515; Tue, 11 Feb 2020 02:16:38 -0800 (PST) MIME-Version: 1.0 From: hema sai chandra Date: Tue, 11 Feb 2020 15:46:27 +0530 Message-ID: To: tomaszx.kulasek@intel.com, ian.betts@intel.com Cc: users@dpdk.org, dev@dpdk.org X-Mailman-Approved-At: Wed, 12 Feb 2020 19:42:26 +0100 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] segmentation fault in lthread_run() on ARM64 processor - regarding X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.