You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/09 11:27:09 UTC

[GitHub] [rocketmq-client-go] mgtoxd opened a new issue #776: unexpected fault address 0x0

mgtoxd opened a new issue #776:
URL: https://github.com/apache/rocketmq-client-go/issues/776


   My rocketmq running well under the Java code, when I try go-client I met a mistake I couldn't solve
   
   I see this:
   ```shell
   unexpected fault address 0x0
   fatal error: fault
   [signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x46075f]
   
   ```
   [All error messages](https://gist.github.com/mgtoxd/55b4f604e5a23ad9465a2e33c6929b42) 
   
   The code I ran was very simple
   ```go
   package main
   
   import (
   	"context"
   	"fmt"
   	"github.com/apache/rocketmq-client-go/v2"
   	"github.com/apache/rocketmq-client-go/v2/primitive"
   	"github.com/apache/rocketmq-client-go/v2/producer"
   )
   
   func main() {
   	p, err := rocketmq.NewProducer(
   		producer.WithNameServer([]string{"127.0.0.1:9876"}),
   		//producer.WithNsResolver(primitive.NewPassthroughResolver(endPoint)),
   		producer.WithRetry(2),
   		producer.WithGroupName("eee"),
   	)
   
   	if err != nil {
   		fmt.Println("1:-", err.Error())
   	}
   	err = p.Start()
   	if err != nil {
   		fmt.Println("2:-", err.Error())
   	}
   	err = p.SendAsync(context.Background(),
   		func(ctx context.Context, result *primitive.SendResult, e error) {
   			if e != nil {
   				fmt.Printf("receive message error: %s\n", err)
   			} else {
   				fmt.Printf("send message success: result=%s\n", result.String())
   			}
   		}, primitive.NewMessage("test", []byte("Hello RocketMQ Go Client!")))
   
   	if err != nil {
   		fmt.Printf("send message error: %s\n", err)
   	}
   	if err != nil {
   		fmt.Println("3:-", err.Error())
   	}
   }
   
   ```
   environment:
     OS: Arch Linux x86_64
     client version: 2.1.0
     RocketMQ version: 4.9.2
    
   
   I don't know how to fix it
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-go] hxnan commented on issue #776: golang 1.18 unexpected fault address 0x0

Posted by GitBox <gi...@apache.org>.
hxnan commented on issue #776:
URL: https://github.com/apache/rocketmq-client-go/issues/776#issuecomment-1079695124


   I met this issue too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-go] mgtoxd commented on issue #776: golang 1.18 unexpected fault address 0x0

Posted by GitBox <gi...@apache.org>.
mgtoxd commented on issue #776:
URL: https://github.com/apache/rocketmq-client-go/issues/776#issuecomment-1034443447


   ok I found the answer, I used golang 1.18, and I change to 1.17, it work


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-go] vongosling closed issue #776: golang 1.18 unexpected fault address 0x0

Posted by GitBox <gi...@apache.org>.
vongosling closed issue #776:
URL: https://github.com/apache/rocketmq-client-go/issues/776


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org